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

Constructor & Destructor Documentation

◆ recacheItem()

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

Definition at line 1080 of file view.cpp.

1080  :
1081  view( aView ), gal( aGal ), layer( aLayer )
1082  {
1083  }

Member Function Documentation

◆ operator()()

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

Definition at line 1085 of file view.cpp.

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

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

Member Data Documentation

◆ gal

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

Definition at line 1105 of file view.cpp.

Referenced by operator()().

◆ layer

int KIGFX::VIEW::recacheItem::layer

Definition at line 1106 of file view.cpp.

Referenced by operator()().

◆ view

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

Definition at line 1104 of file view.cpp.

Referenced by operator()().


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