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

Constructor & Destructor Documentation

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

Definition at line 951 of file view.cpp.

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

Member Function Documentation

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

Definition at line 956 of file view.cpp.

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

957  {
958  auto viewData = aItem->viewPrivData();
959 
960  if( !viewData )
961  return false;
962 
963  // Remove previously cached group
964  int group = viewData->getGroup( layer );
965 
966  if( group >= 0 )
967  gal->DeleteGroup( group );
968 
969  viewData->setGroup( layer, -1 );
970  view->Update( aItem );
971 
972  return true;
973  }
virtual void DeleteGroup(int aGroupNumber)
Delete the group from the memory.
void Update(VIEW_ITEM *aItem)
Function Update() For dynamic VIEWs, informs the associated VIEW that the graphical representation of...
Definition: view.cpp:1378

Member Data Documentation

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

Definition at line 976 of file view.cpp.

Referenced by operator()().

int KIGFX::VIEW::recacheItem::layer

Definition at line 977 of file view.cpp.

Referenced by operator()().

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

Definition at line 975 of file view.cpp.

Referenced by operator()().


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