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 1076 of file view.cpp.

Constructor & Destructor Documentation

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

Definition at line 1078 of file view.cpp.

1078  :
1079  view( aView ), gal( aGal ), layer( aLayer )
1080  {
1081  }

Member Function Documentation

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

Definition at line 1083 of file view.cpp.

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

1084  {
1085  auto viewData = aItem->viewPrivData();
1086 
1087  if( !viewData )
1088  return false;
1089 
1090  // Remove previously cached group
1091  int group = viewData->getGroup( layer );
1092 
1093  if( group >= 0 )
1094  gal->DeleteGroup( group );
1095 
1096  viewData->setGroup( layer, -1 );
1097  view->Update( aItem );
1098 
1099  return true;
1100  }
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:1530

Member Data Documentation

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

Definition at line 1103 of file view.cpp.

int KIGFX::VIEW::recacheItem::layer

Definition at line 1104 of file view.cpp.

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

Definition at line 1102 of file view.cpp.


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