Make -f set standalone mode in kiway
This commit is contained in:
parent
67e12d4ff6
commit
2bac898298
|
@ -394,6 +394,12 @@ public:
|
||||||
|
|
||||||
KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop = nullptr );
|
KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop = nullptr );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overwrites previously set ctl bits, only for use in kicad.cpp to flip between
|
||||||
|
* standalone and manager mode before we actually load anything
|
||||||
|
*/
|
||||||
|
void SetCtlBits( int aCtlBits ) { m_ctl = aCtlBits; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell this KIWAY about the top most frame in the program and optionally allows it to
|
* Tell this KIWAY about the top most frame in the program and optionally allows it to
|
||||||
* play the role of one of the KIWAY_PLAYERs if launched from single_top.cpp.
|
* play the role of one of the KIWAY_PLAYERs if launched from single_top.cpp.
|
||||||
|
|
|
@ -152,6 +152,15 @@ bool PGM_KICAD::OnPgmInit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( appType == KICAD_MAIN_FRAME_T )
|
||||||
|
{
|
||||||
|
Kiway.SetCtlBits( KFCTL_CPP_PROJECT_SUITE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Kiway.SetCtlBits( KFCTL_STANDALONE );
|
||||||
|
}
|
||||||
|
|
||||||
bool skipPythonInit = false;
|
bool skipPythonInit = false;
|
||||||
|
|
||||||
if( appType == FRAME_BM2CMP || appType == FRAME_PL_EDITOR || appType == FRAME_GERBER
|
if( appType == FRAME_BM2CMP || appType == FRAME_PL_EDITOR || appType == FRAME_GERBER
|
||||||
|
@ -163,7 +172,6 @@ bool PGM_KICAD::OnPgmInit()
|
||||||
|
|
||||||
m_bm.InitSettings( new KICAD_SETTINGS );
|
m_bm.InitSettings( new KICAD_SETTINGS );
|
||||||
GetSettingsManager().RegisterSettings( PgmSettings() );
|
GetSettingsManager().RegisterSettings( PgmSettings() );
|
||||||
GetSettingsManager().SetKiway( &Kiway );
|
|
||||||
m_bm.Init();
|
m_bm.Init();
|
||||||
|
|
||||||
// Add search paths to feed the PGM_KICAD::SysSearch() function,
|
// Add search paths to feed the PGM_KICAD::SysSearch() function,
|
||||||
|
|
Loading…
Reference in New Issue