Kicad manager: fix an issue when starting eeschema from its button: if the library editor was previously running, and if the quasimodal field editor dialog was called, eeschema dis not start on Windows, or started but dis not load the schematic project on Linux.
Enhancement: if a tool is running but is iconized, clicking on its button bring the window on screen.
This commit is contained in:
parent
3a5097f0d7
commit
fe4c01a6f2
|
@ -106,7 +106,7 @@ private:
|
|||
void setRowItem( int aFieldNdx, const SCH_FIELD& aField );
|
||||
|
||||
// event handlers
|
||||
void OnCloseDialog( wxCloseEvent& event );
|
||||
void OnCloseDialog( wxCloseEvent& event );
|
||||
void OnListItemDeselected( wxListEvent& event );
|
||||
void OnListItemSelected( wxListEvent& event );
|
||||
void OnCancelButtonClick( wxCommandEvent& event );
|
||||
|
|
|
@ -278,12 +278,25 @@ void KICAD_MANAGER_FRAME::Execute( wxWindow* frame, const wxString& execFile,
|
|||
void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName )
|
||||
{
|
||||
KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH, false );
|
||||
|
||||
// Please: note: DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() calls
|
||||
// Kiway.Player( FRAME_SCH, true )
|
||||
// therefore, the schematic editor is sometimes running, but the schematic project
|
||||
// is not loaded, if the library editor was called, and the dialog field editor was used.
|
||||
if( !frame )
|
||||
{
|
||||
frame = Kiway.Player( FRAME_SCH, true );
|
||||
}
|
||||
|
||||
if( !frame->IsShown() ) // the frame exists, but no project loaded.
|
||||
{
|
||||
frame->OpenProjectFiles( std::vector<wxString>( 1, aProjectSchematicFileName ) );
|
||||
frame->Show( true );
|
||||
}
|
||||
|
||||
if( frame->IsIconized() )
|
||||
frame->Iconize( false );
|
||||
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
@ -301,12 +314,17 @@ void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event )
|
|||
void KICAD_MANAGER_FRAME::OnRunSchLibEditor( wxCommandEvent& event )
|
||||
{
|
||||
KIWAY_PLAYER* frame = Kiway.Player( FRAME_SCH_LIB_EDITOR, false );
|
||||
|
||||
if( !frame )
|
||||
{
|
||||
frame = Kiway.Player( FRAME_SCH_LIB_EDITOR, true );
|
||||
// frame->OpenProjectFiles( std::vector<wxString>( 1, aProjectSchematicFileName ) );
|
||||
frame->Show( true );
|
||||
}
|
||||
|
||||
if( frame->IsIconized() )
|
||||
frame->Iconize( false );
|
||||
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
@ -331,6 +349,10 @@ void KICAD_MANAGER_FRAME::RunPcbNew( const wxString& aProjectBoardFileName )
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
if( frame->IsIconized() )
|
||||
frame->Iconize( false );
|
||||
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
@ -358,6 +380,9 @@ void KICAD_MANAGER_FRAME::OnRunPcbFpEditor( wxCommandEvent& event )
|
|||
frame->Show( true );
|
||||
}
|
||||
|
||||
if( frame->IsIconized() )
|
||||
frame->Iconize( false );
|
||||
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
@ -392,6 +417,10 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event )
|
|||
frame->OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ) );
|
||||
frame->Show( true );
|
||||
}
|
||||
|
||||
if( frame->IsIconized() )
|
||||
frame->Iconize( false );
|
||||
|
||||
frame->Raise();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue