KiCad PCB EDA Suite
KIGFX::VIEW::recacheItem Struct Reference

Public Member Functions

 recacheItem (VIEW *aView, GAL *aGal, int aLayer)
 
bool operator() (VIEW_ITEM *aItem)
 

Public Attributes

VIEWview
 
GALgal
 
int layer
 

Detailed Description

Definition at line 934 of file view.cpp.

Constructor & Destructor Documentation

KIGFX::VIEW::recacheItem::recacheItem ( VIEW aView,
GAL aGal,
int  aLayer 
)
inline

Definition at line 936 of file view.cpp.

936  :
937  view( aView ), gal( aGal ), layer( aLayer )
938  {
939  }

Member Function Documentation

bool KIGFX::VIEW::recacheItem::operator() ( VIEW_ITEM aItem)
inline

Definition at line 941 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::getGroup(), and KIGFX::VIEW_ITEM::viewPrivData().

942  {
943  auto viewData = aItem->viewPrivData();
944 
945  if( !viewData )
946  return false;
947 
948  // Remove previously cached group
949  int group = viewData->getGroup( layer );
950 
951  if( group >= 0 )
952  gal->DeleteGroup( group );
953 
954  viewData->setGroup( layer, -1 );
955  view->Update( aItem );
956 
957  return true;
958  }
virtual void DeleteGroup(int aGroupNumber)
Delete the group from the memory.
virtual void Update(VIEW_ITEM *aItem, int aUpdateFlags)
For dynamic VIEWs, informs the associated VIEW that the graphical representation of this item has cha...
Definition: view.cpp:1382

Member Data Documentation

GAL* KIGFX::VIEW::recacheItem::gal

Definition at line 961 of file view.cpp.

int KIGFX::VIEW::recacheItem::layer

Definition at line 962 of file view.cpp.

VIEW* KIGFX::VIEW::recacheItem::view

Definition at line 960 of file view.cpp.


The documentation for this struct was generated from the following file: