Sch editor and Simulator: close the simulator frame when the schematic editor is closed, to avoid crash, due to the fact the simulator can try to access to a no more existing frame..
This commit is contained in:
parent
26b1c732de
commit
69e4231303
|
@ -52,6 +52,7 @@
|
||||||
#include <eeschema_config.h>
|
#include <eeschema_config.h>
|
||||||
#include <sch_sheet.h>
|
#include <sch_sheet.h>
|
||||||
#include <sch_sheet_path.h>
|
#include <sch_sheet_path.h>
|
||||||
|
#include "sim/sim_plot_frame.h"
|
||||||
|
|
||||||
#include <invoke_sch_dialog.h>
|
#include <invoke_sch_dialog.h>
|
||||||
#include <dialogs/dialog_schematic_find.h>
|
#include <dialogs/dialog_schematic_find.h>
|
||||||
|
@ -623,6 +624,11 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SIM_PLOT_FRAME* simFrame = (SIM_PLOT_FRAME*) Kiway().Player( FRAME_SIMULATOR, false );
|
||||||
|
|
||||||
|
if( simFrame && !simFrame->Close() ) // Can close the simulator?
|
||||||
|
return;
|
||||||
|
|
||||||
SCH_SHEET_LIST sheetList( g_RootSheet );
|
SCH_SHEET_LIST sheetList( g_RootSheet );
|
||||||
|
|
||||||
if( sheetList.IsModified() )
|
if( sheetList.IsModified() )
|
||||||
|
|
|
@ -3749,7 +3749,7 @@ void PLACE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IO_ERROR )
|
||||||
|
|
||||||
if( part_number.size() )
|
if( part_number.size() )
|
||||||
{
|
{
|
||||||
const char* quote = out->GetQuoteChar( part_number.c_str() );
|
quote = out->GetQuoteChar( part_number.c_str() );
|
||||||
out->Print( nestLevel+1, "(PN %s%s%s)\n",
|
out->Print( nestLevel+1, "(PN %s%s%s)\n",
|
||||||
quote, part_number.c_str(), quote );
|
quote, part_number.c_str(), quote );
|
||||||
}
|
}
|
||||||
|
@ -3764,7 +3764,7 @@ void PLACE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IO_ERROR )
|
||||||
|
|
||||||
if( part_number.size() )
|
if( part_number.size() )
|
||||||
{
|
{
|
||||||
const char* quote = out->GetQuoteChar( part_number.c_str() );
|
quote = out->GetQuoteChar( part_number.c_str() );
|
||||||
out->Print( 0, "%s(PN %s%s%s)", space,
|
out->Print( 0, "%s(PN %s%s%s)", space,
|
||||||
quote, part_number.c_str(), quote );
|
quote, part_number.c_str(), quote );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue