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

Constructor & Destructor Documentation

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

Definition at line 940 of file view.cpp.

940  :
941  view( aView ), gal( aGal ), layer( aLayer )
942  {
943  }

Member Function Documentation

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

Definition at line 945 of file view.cpp.

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

946  {
947  auto viewData = aItem->viewPrivData();
948 
949  if( !viewData )
950  return false;
951 
952  // Remove previously cached group
953  int group = viewData->getGroup( layer );
954 
955  if( group >= 0 )
956  gal->DeleteGroup( group );
957 
958  viewData->setGroup( layer, -1 );
959  view->Update( aItem );
960 
961  return true;
962  }
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:1377

Member Data Documentation

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

Definition at line 965 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::recacheItem::layer

Definition at line 966 of file view.cpp.

Referenced by operator()().

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

Definition at line 964 of file view.cpp.

Referenced by operator()().


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