diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 208a49dd52..378c51fb75 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -97,7 +97,7 @@ static struct IFACE : public KIFACE_I 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; } break; diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 94c219b56d..67b9619299 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -94,8 +94,10 @@ private: 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_simulator = NULL; m_simThread = NULL; diff --git a/eeschema/sim/simulate.cpp b/eeschema/sim/simulate.cpp index 43965ae25d..efd5e316f4 100644 --- a/eeschema/sim/simulate.cpp +++ b/eeschema/sim/simulate.cpp @@ -28,13 +28,8 @@ void SCH_EDIT_FRAME::OnSimulationRun( wxCommandEvent& event ) { - SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, false ); - - if( !simFrame ) - { - simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, true ); - simFrame->Show( true ); - } + SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, true ); + simFrame->Show( true ); // On Windows, Raise() does not bring the window on screen, when iconized if( simFrame->IsIconized() )