Loading pcbnew/dialogs/dialog_netlist.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -5,10 +5,12 @@ ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "appl_wxstruct.h" #include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "pcbnew_config.h" #include "dialog_netlist.h" Loading @@ -24,6 +26,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos ) * name if no last file read is not set. */ wxFileName fn = GetLastNetListRead(); wxString lastNetlistName = GetLastNetListRead(); if( !fn.FileExists() ) { Loading @@ -31,9 +34,21 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos ) fn.SetExt( NetExtBuffer ); } DIALOG_NETLIST frame( this, DC, fn.GetFullPath() ); DIALOG_NETLIST frame( this, DC, lastNetlistName ); frame.ShowModal(); // Save project settings if needed. // Project settings are saved in the corresponding <board name>.pro file if( lastNetlistName != GetLastNetListRead() && !GetScreen()->GetFileName().IsEmpty() && IsOK(NULL, _("Project config has changed. Save it ?") ) ) { wxFileName fn = GetScreen()->GetFileName(); fn.SetExt( ProjectFileExtension ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } } Loading pcbnew/pcbframe.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -467,13 +467,6 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) } } if( !GetScreen()->GetFileName().IsEmpty() ) { wxFileName fn = GetScreen()->GetFileName(); fn.SetExt( ProjectFileExtension ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } SaveSettings(); // do not show the window because ScreenPcb will be deleted and we do not Loading pcbnew/pcbnew_config.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters() 120, 0, 0xFFFF ) ); m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "MSegLar" ), &g_ModuleSegmentWidth, 120, 0, 0xFFFF ) ); m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "LastNetListRead" ), m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) ); return m_projectFileParams; } Loading pcbnew/pcbplot.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "dialog_plot_base.h" #include "pcb_plot_params.h" /* Keywords to r/w options in m_Config */ #define CONFIG_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" ) #define CONFIG_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" ) Loading Loading @@ -235,6 +234,7 @@ void DIALOG_PLOT::OnClose( wxCloseEvent& event ) prevPosition = GetPosition(); prevSize = GetSize(); applyPlotSettings(); EndModal( 0 ); } Loading @@ -260,7 +260,7 @@ void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event ) void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { // Build the absolute path of current output plot directory // to preselect it when opening the Di Dialog. // to preselect it when opening the dialog. wxFileName fn( m_outputDirectoryName->GetValue() ); wxString path; if( fn.IsRelative() ) Loading Loading
pcbnew/dialogs/dialog_netlist.cpp +17 −2 Original line number Diff line number Diff line Loading @@ -5,10 +5,12 @@ ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "appl_wxstruct.h" #include "common.h" #include "confirm.h" #include "pcbnew.h" #include "wxPcbStruct.h" #include "pcbnew_config.h" #include "dialog_netlist.h" Loading @@ -24,6 +26,7 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos ) * name if no last file read is not set. */ wxFileName fn = GetLastNetListRead(); wxString lastNetlistName = GetLastNetListRead(); if( !fn.FileExists() ) { Loading @@ -31,9 +34,21 @@ void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC, const wxPoint& pos ) fn.SetExt( NetExtBuffer ); } DIALOG_NETLIST frame( this, DC, fn.GetFullPath() ); DIALOG_NETLIST frame( this, DC, lastNetlistName ); frame.ShowModal(); // Save project settings if needed. // Project settings are saved in the corresponding <board name>.pro file if( lastNetlistName != GetLastNetListRead() && !GetScreen()->GetFileName().IsEmpty() && IsOK(NULL, _("Project config has changed. Save it ?") ) ) { wxFileName fn = GetScreen()->GetFileName(); fn.SetExt( ProjectFileExtension ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } } Loading
pcbnew/pcbframe.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -467,13 +467,6 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) } } if( !GetScreen()->GetFileName().IsEmpty() ) { wxFileName fn = GetScreen()->GetFileName(); fn.SetExt( ProjectFileExtension ); wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() ); } SaveSettings(); // do not show the window because ScreenPcb will be deleted and we do not Loading
pcbnew/pcbnew_config.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters() 120, 0, 0xFFFF ) ); m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "MSegLar" ), &g_ModuleSegmentWidth, 120, 0, 0xFFFF ) ); m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "LastNetListRead" ), m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) ); return m_projectFileParams; } Loading
pcbnew/pcbplot.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "dialog_plot_base.h" #include "pcb_plot_params.h" /* Keywords to r/w options in m_Config */ #define CONFIG_XFINESCALE_ADJ wxT( "PlotXFineScaleAdj" ) #define CONFIG_YFINESCALE_ADJ wxT( "PlotYFineScaleAdj" ) Loading Loading @@ -235,6 +234,7 @@ void DIALOG_PLOT::OnClose( wxCloseEvent& event ) prevPosition = GetPosition(); prevSize = GetSize(); applyPlotSettings(); EndModal( 0 ); } Loading @@ -260,7 +260,7 @@ void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event ) void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { // Build the absolute path of current output plot directory // to preselect it when opening the Di Dialog. // to preselect it when opening the dialog. wxFileName fn( m_outputDirectoryName->GetValue() ); wxString path; if( fn.IsRelative() ) Loading