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

Constructor & Destructor Documentation

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

Definition at line 952 of file view.cpp.

952  :
953  view( aView ), gal( aGal ), layer( aLayer )
954  {
955  }

Member Function Documentation

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

Definition at line 957 of file view.cpp.

References KIGFX::GAL::DeleteGroup(), gal, KIGFX::VIEW_ITEM_DATA::getGroup(), layer, KIGFX::VIEW::Update(), view, and KIGFX::VIEW_ITEM::viewPrivData().

958  {
959  auto viewData = aItem->viewPrivData();
960 
961  if( !viewData )
962  return false;
963 
964  // Remove previously cached group
965  int group = viewData->getGroup( layer );
966 
967  if( group >= 0 )
968  gal->DeleteGroup( group );
969 
970  viewData->setGroup( layer, -1 );
971  view->Update( aItem );
972 
973  return true;
974  }
virtual void DeleteGroup(int aGroupNumber)
Delete the group from the memory.
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:1385

Member Data Documentation

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

Definition at line 977 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::recacheItem::layer

Definition at line 978 of file view.cpp.

Referenced by operator()().

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

Definition at line 976 of file view.cpp.

Referenced by operator()().


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