mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Don't reset editPad if it still exists after model reset.
Fixes https://gitlab.com/kicad/code/kicad/issues/12630
This commit is contained in:
parent
f9a791e2b0
commit
8b9cbd5805
@ -59,7 +59,7 @@ void PAD_TOOL::Reset( RESET_REASON aReason )
|
|||||||
if( aReason == MODEL_RELOAD )
|
if( aReason == MODEL_RELOAD )
|
||||||
m_lastPadNumber = wxT( "1" );
|
m_lastPadNumber = wxT( "1" );
|
||||||
|
|
||||||
if( m_editPad != niluuid )
|
if( board() && board()->GetItem( m_editPad ) == DELETED_BOARD_ITEM::GetInstance() )
|
||||||
{
|
{
|
||||||
PCB_DISPLAY_OPTIONS opts = frame()->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS opts = frame()->GetDisplayOptions();
|
||||||
bool highContrast = ( opts.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL );
|
bool highContrast = ( opts.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL );
|
||||||
@ -68,9 +68,9 @@ void PAD_TOOL::Reset( RESET_REASON aReason )
|
|||||||
m_toolMgr->RunAction( ACTIONS::highContrastMode, true );
|
m_toolMgr->RunAction( ACTIONS::highContrastMode, true );
|
||||||
|
|
||||||
frame()->GetInfoBar()->Dismiss();
|
frame()->GetInfoBar()->Dismiss();
|
||||||
}
|
|
||||||
|
|
||||||
m_editPad = niluuid;
|
m_editPad = niluuid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user