221
222
SetElementVisibility( RATSNEST_VISIBLE, showRats );
225
// Load the page layout decr file, from the filename stored in
226
// BASE_SCREEN::m_PageLayoutDescrFileName, read in config project file
227
// If empty, the default descr is loaded
228
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
229
pglayout.SetPageLayout(BASE_SCREEN::m_PageLayoutDescrFileName);
224
231
loadFootprintLibTable();
230
void PCB_EDIT_FRAME::SaveProjectSettings()
237
void PCB_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
234
241
fn = GetBoard()->GetFileName();
235
242
fn.SetExt( ProjectFileExtension );
237
wxFileDialog dlg( this, _( "Save Project File" ), fn.GetPath(), fn.GetFullName(),
238
ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR );
240
if( dlg.ShowModal() == wxID_CANCEL )
243
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() );
246
wxFileDialog dlg( this, _( "Save Project File" ),
247
fn.GetPath(), fn.GetFullName(),
248
ProjectFileWildcard, wxFD_SAVE | wxFD_CHANGE_DIR );
250
if( dlg.ShowModal() == wxID_CANCEL )
253
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() );
257
wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() );
249
263
PARAM_CFG_ARRAY pca;
265
pca.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
266
&BASE_SCREEN::m_PageLayoutDescrFileName ) );
251
268
pca.push_back( new PARAM_CFG_FILENAME( wxT( "LibDir" ),&g_UserLibDirBuffer,
253
270
pca.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
271
&g_LibraryNames, GROUPLIB ) );
257
273
pca.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ),
258
&m_lastNetListRead ) );
274
&m_lastNetListRead ) );
260
276
pca.push_back( new PARAM_CFG_BOOL( wxT( "UseCmpFile" ),
261
&m_useCmpFileForFpNames, true ) );
277
&m_useCmpFileForFpNames, true ) );
262
278
GetBoard()->GetDesignSettings().AppendConfigs( &pca );