Re-create missing exclusion markers if DRC was cancelled.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14919
This commit is contained in:
Jeff Young 2023-06-11 12:14:03 +01:00
parent 3159391e28
commit 93789e75b9
2 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ void DRC_TOOL::ShowDRCDialog( wxWindow* aParent )
if( !m_drcDialog ) if( !m_drcDialog )
{ {
m_drcDialog = new DIALOG_DRC( m_editFrame, aParent ); m_drcDialog = new DIALOG_DRC( m_editFrame, aParent );
updatePointers(); updatePointers( false );
if( show_dlg_modal ) if( show_dlg_modal )
m_drcDialog->ShowModal(); m_drcDialog->ShowModal();
@ -96,7 +96,7 @@ void DRC_TOOL::ShowDRCDialog( wxWindow* aParent )
} }
else // The dialog is just not visible (because the user has double clicked on an error item) else // The dialog is just not visible (because the user has double clicked on an error item)
{ {
updatePointers(); updatePointers( false );
m_drcDialog->Show( true ); m_drcDialog->Show( true );
} }
} }
@ -197,16 +197,16 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones
m_editFrame->ShowSolderMask(); m_editFrame->ShowSolderMask();
// update the m_drcDialog listboxes // update the m_drcDialog listboxes
updatePointers(); updatePointers( aProgressReporter->IsCancelled() );
} }
void DRC_TOOL::updatePointers() void DRC_TOOL::updatePointers( bool aDRCWasCancelled )
{ {
// update my pointers, m_editFrame is the only unchangeable one // update my pointers, m_editFrame is the only unchangeable one
m_pcb = m_editFrame->GetBoard(); m_pcb = m_editFrame->GetBoard();
m_editFrame->ResolveDRCExclusions( false ); m_editFrame->ResolveDRCExclusions( aDRCWasCancelled );
if( m_drcDialog ) if( m_drcDialog )
m_drcDialog->UpdateData(); m_drcDialog->UpdateData();

View File

@ -102,7 +102,7 @@ private:
/** /**
* Update needed pointers from the one pointer which is known not to change. * Update needed pointers from the one pointer which is known not to change.
*/ */
void updatePointers(); void updatePointers( bool aDRCWasCancelled );
EDA_UNITS userUnits() const { return m_editFrame->GetUserUnits(); } EDA_UNITS userUnits() const { return m_editFrame->GetUserUnits(); }