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

Constructor & Destructor Documentation

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

Definition at line 939 of file view.cpp.

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

Member Function Documentation

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

Definition at line 944 of file view.cpp.

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

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

Member Data Documentation

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

Definition at line 964 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::recacheItem::layer

Definition at line 965 of file view.cpp.

Referenced by operator()().

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

Definition at line 963 of file view.cpp.

Referenced by operator()().


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