Fixed Kiway problems in SIM_PLOT_FRAME

This commit is contained in:
Maciej Suminski 2016-08-11 14:41:15 +02:00
parent 549a96da0b
commit 2b1d2d7bd1
3 changed files with 6 additions and 9 deletions

View File

@ -97,7 +97,7 @@ static struct IFACE : public KIFACE_I
case FRAME_SIMULATOR: case FRAME_SIMULATOR:
{ {
SIM_PLOT_FRAME_BASE* frame = new SIM_PLOT_FRAME( aKiway, aParent ); SIM_PLOT_FRAME* frame = new SIM_PLOT_FRAME( aKiway, aParent );
return frame; return frame;
} }
break; break;

View File

@ -94,8 +94,10 @@ private:
SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent ) SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
: SIM_PLOT_FRAME_BASE( aKiway, aParent ) : SIM_PLOT_FRAME_BASE( aParent )
{ {
SetKiway( this, aKiway );
m_exporter = NULL; m_exporter = NULL;
m_simulator = NULL; m_simulator = NULL;
m_simThread = NULL; m_simThread = NULL;

View File

@ -28,13 +28,8 @@
void SCH_EDIT_FRAME::OnSimulationRun( wxCommandEvent& event ) void SCH_EDIT_FRAME::OnSimulationRun( wxCommandEvent& event )
{ {
SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, false ); SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, true );
if( !simFrame )
{
simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, true );
simFrame->Show( true ); simFrame->Show( true );
}
// On Windows, Raise() does not bring the window on screen, when iconized // On Windows, Raise() does not bring the window on screen, when iconized
if( simFrame->IsIconized() ) if( simFrame->IsIconized() )