open pcbnew with filename even when previously loaded with no filename.
This commit is contained in:
parent
87a5fa18d1
commit
9de02e88a3
|
@ -313,6 +313,7 @@ void KICAD_MANAGER_FRAME::OnRunSchLibEditor( wxCommandEvent& event )
|
||||||
|
|
||||||
void KICAD_MANAGER_FRAME::RunPcbNew( const wxString& aProjectBoardFileName )
|
void KICAD_MANAGER_FRAME::RunPcbNew( const wxString& aProjectBoardFileName )
|
||||||
{
|
{
|
||||||
|
#if 0 // line 171 of modview_frame.cpp breaks this code
|
||||||
KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false );
|
KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, false );
|
||||||
if( !frame )
|
if( !frame )
|
||||||
{
|
{
|
||||||
|
@ -320,6 +321,16 @@ void KICAD_MANAGER_FRAME::RunPcbNew( const wxString& aProjectBoardFileName )
|
||||||
frame->OpenProjectFiles( std::vector<wxString>( 1, aProjectBoardFileName ) );
|
frame->OpenProjectFiles( std::vector<wxString>( 1, aProjectBoardFileName ) );
|
||||||
frame->Show( true );
|
frame->Show( true );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
KIWAY_PLAYER* frame = Kiway.Player( FRAME_PCB, true );
|
||||||
|
|
||||||
|
if( !frame->IsVisible() )
|
||||||
|
{
|
||||||
|
frame->OpenProjectFiles( std::vector<wxString>( 1, aProjectBoardFileName ) );
|
||||||
|
frame->Show( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
frame->Raise();
|
frame->Raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue