KiWay: Make sure to mark closed windows as closed
Also make sure to veto project import if we couldn't close the existing project.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13215
Maybe also fixes some other weird crashes, we'll see.
(cherry picked from commit 7e778c9856
)
This commit is contained in:
parent
5144186fca
commit
968406c6b5
|
@ -465,7 +465,10 @@ bool KIWAY::PlayerClose( FRAME_T aFrameType, bool doForce )
|
|||
return true;
|
||||
|
||||
if( frame->NonUserClose( doForce ) )
|
||||
{
|
||||
m_playerFrameId[aFrameType] = wxID_NONE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,8 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( const wxString& aWindowTitle,
|
|||
// OK, we got a new project to open. Time to close any existing project before we go on
|
||||
// to collect info about where to put the new one, etc. Otherwise the workflow is kind of
|
||||
// disjoint.
|
||||
CloseProject( true );
|
||||
if( !CloseProject( true ) )
|
||||
return;
|
||||
|
||||
wxFileName sch( schdlg.GetPath() );
|
||||
sch.SetExt( aSchFileExtension );
|
||||
|
|
Loading…
Reference in New Issue