Make sure markers get removed from view when deleted.
This commit is contained in:
parent
3ea093539b
commit
6ef6284924
|
@ -256,8 +256,6 @@ public:
|
||||||
|
|
||||||
virtual void CenterScreen( const wxPoint& aCenterPoint, bool aWarpPointer );
|
virtual void CenterScreen( const wxPoint& aCenterPoint, bool aWarpPointer );
|
||||||
|
|
||||||
void FocusOnItem( SCH_ITEM* aItem );
|
|
||||||
|
|
||||||
void HardRedraw() override;
|
void HardRedraw() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -372,11 +372,15 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
||||||
bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
|
bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE;
|
||||||
|
|
||||||
std::vector<MARKER_PCB*>& markers = m_brdEditor->GetBoard()->Markers();
|
std::vector<MARKER_PCB*>& markers = m_brdEditor->GetBoard()->Markers();
|
||||||
|
KIGFX::VIEW* view = m_parentFrame->GetToolManager()->GetView();
|
||||||
|
|
||||||
for( unsigned i = 0; i < markers.size(); )
|
for( unsigned i = 0; i < markers.size(); )
|
||||||
{
|
{
|
||||||
if( markers[i]->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
|
if( markers[i]->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
|
||||||
|
{
|
||||||
|
view->Remove( markers.at( i ) );
|
||||||
markers.erase( markers.begin() + i );
|
markers.erase( markers.begin() + i );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue