Eeschema: enable a few disabled stand alone mode options.

* Enable CvPcb launching in stand alone mode.
* Enable footprint editor launching in stand alone mode.
* Remove some dead code left over from the change in CvPcb behavior.
* These changes were made for users who prefer to work in a less project-
  centric work flow.  KiCad should not be in the business of dictating
  work flow whenever possible.
This commit is contained in:
Wayne Stambaugh 2015-09-08 14:45:11 -04:00
parent 6e23979253
commit 626915851c
3 changed files with 25 additions and 62 deletions

View File

@ -463,15 +463,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
toolsMenu->AppendSeparator();
if( !Kiface().IsSingle() ) // only with a functional KIWAY, not single_top
{
// Run CvPcb
AddMenuItem( toolsMenu,
ID_RUN_CVPCB,
_( "A&ssign Component Footprint" ),
_( "Run CvPcb" ),
KiBitmap( cvpcb_xpm ) );
}
// Run CvPcb
AddMenuItem( toolsMenu,
ID_RUN_CVPCB,
_( "A&ssign Component Footprint" ),
_( "Run CvPcb" ),
KiBitmap( cvpcb_xpm ) );
// Run Pcbnew
AddMenuItem( toolsMenu,

View File

@ -1008,21 +1008,18 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event )
void SCH_EDIT_FRAME::OnOpenPcbModuleEditor( wxCommandEvent& event )
{
if( !Kiface().IsSingle() )
wxFileName fn = Prj().AbsolutePath( g_RootSheet->GetScreen()->GetFileName() );
if( fn.IsOk() )
{
wxFileName fn = Prj().AbsolutePath( g_RootSheet->GetScreen()->GetFileName() );
KIWAY_PLAYER* fp_editor = Kiway().Player( FRAME_PCB_MODULE_EDITOR );
if( fn.IsOk() )
{
KIWAY_PLAYER* fp_editor = Kiway().Player( FRAME_PCB_MODULE_EDITOR );
// On Windows, Raise() does not bring the window on screen, when iconized
if( fp_editor->IsIconized() )
fp_editor->Iconize( false );
// On Windows, Raise() does not bring the window on screen, when iconized
if( fp_editor->IsIconized() )
fp_editor->Iconize( false );
fp_editor->Show( true );
fp_editor->Raise();
}
fp_editor->Show( true );
fp_editor->Raise();
}
}
@ -1033,45 +1030,20 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event )
fn.SetExt( NetlistFileExtension );
if( Kiface().IsSingle() )
if( prepareForNetlist() )
{
/* the CVPCB executable is now gone, only the *.kiface remains, that is because
* CVPCB can now read the netlist ONLY from the Kiway. This removes cvpcb's
* use of the *.cmp file altogether, and also its use of reading the *.net file
* from disk.
ExecuteFile( this, CVPCB_EXE, QuoteFullPath( fn ) );
*/
}
else
{
#if 0
KIWAY_PLAYER* player = Kiway().Player( FRAME_CVPCB, false ); // test open already.
if( !player )
{
player = Kiway().Player( FRAME_CVPCB, true );
player->Show( true );
player->OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ) );
// player->OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ) );
}
sendNetlist();
player->Raise();
#else
if( prepareForNetlist() )
{
KIWAY_PLAYER* player = Kiway().Player( FRAME_CVPCB, false ); // test open already.
if( !player )
{
player = Kiway().Player( FRAME_CVPCB, true );
player->Show( true );
// player->OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ) );
}
sendNetlist();
player->Raise();
}
#endif
}
}

View File

@ -64,7 +64,6 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddTool( ID_SAVE_PROJECT, wxEmptyString, KiBitmap( save_project_xpm ),
_( "Save schematic project" ) );
m_mainToolBar->AddSeparator();
m_mainToolBar->AddTool( ID_SHEET_SET, wxEmptyString, KiBitmap( sheetset_xpm ),
@ -157,18 +156,13 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddSeparator();
// The user must HAVE footprints before he can assign them. So put this before
// the CVPCB.
if( !Kiface().IsSingle() ) // if eeschema is not a separate process
{
m_mainToolBar->AddTool( ID_RUN_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ),
_( "Footprint Editor" ) );
// The user must have footprints before he can assign them. So put this before CvPcb.
// CVPCB only reads from the kiway now, and the kiway is only implemented in the
// project manager, not single_top.
m_mainToolBar->AddTool( ID_RUN_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ),
_( "Run CvPcb to associate components and footprints" ) );
}
m_mainToolBar->AddTool( ID_RUN_PCB_MODULE_EDITOR, wxEmptyString, KiBitmap( module_editor_xpm ),
_( "Footprint Editor" ) );
m_mainToolBar->AddTool( ID_RUN_CVPCB, wxEmptyString, KiBitmap( cvpcb_xpm ),
_( "Run CvPcb to associate components and footprints" ) );
m_mainToolBar->AddTool( ID_RUN_PCB, wxEmptyString, KiBitmap( pcbnew_xpm ),
_( "Run Pcbnew to layout printed circuit board" ) );