eeschema: Add component needs to be Modal
Adding a component in eeschema accesses the footprint table as well as the symbol table. There are no safe edits that can be taken while this window is open, so we force it to be Modal instead of QuasiModal The issue is addressed but reveals additional possible problems that this commit fixes Fixes https://gitlab.com/kicad/code/kicad/issues/5206
This commit is contained in:
parent
6ef20e34fc
commit
a029feb029
|
@ -333,7 +333,13 @@ LIB_ID DIALOG_CHOOSE_COMPONENT::GetSelectedLibId( int* aUnit ) const
|
|||
void DIALOG_CHOOSE_COMPONENT::OnUseBrowser( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_external_browser_requested = true;
|
||||
EndQuasiModal( wxID_OK );
|
||||
|
||||
if( IsQuasiModal() )
|
||||
EndQuasiModal( wxID_OK );
|
||||
else if( IsModal() )
|
||||
EndModal( wxID_OK );
|
||||
else
|
||||
wxFAIL_MSG( "Dialog called with neither Modal nor QuasiModal" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -353,7 +359,12 @@ void DIALOG_CHOOSE_COMPONENT::OnCloseTimer( wxTimerEvent& aEvent )
|
|||
}
|
||||
else
|
||||
{
|
||||
EndQuasiModal( wxID_OK );
|
||||
if( IsQuasiModal() )
|
||||
EndQuasiModal( wxID_OK );
|
||||
else if( IsModal() )
|
||||
EndModal( wxID_OK );
|
||||
else
|
||||
wxFAIL_MSG( "Dialog called with neither Modal nor QuasiModal" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ COMPONENT_SELECTION SCH_BASE_FRAME::SelectCompFromLibTree( const SCHLIB_FILTER*
|
|||
DIALOG_CHOOSE_COMPONENT dlg( this, dialogTitle, adapterPtr, aConvert,
|
||||
aAllowFields, aShowFootprints, aUseLibBrowser );
|
||||
|
||||
if( dlg.ShowQuasiModal() == wxID_CANCEL )
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return COMPONENT_SELECTION();
|
||||
|
||||
COMPONENT_SELECTION sel;
|
||||
|
|
Loading…
Reference in New Issue