Point to the user template path by default in pl editor
This commit is contained in:
parent
627d321ec5
commit
32bf88fa8e
|
@ -83,7 +83,7 @@ wxString PATHS::GetUserTemplatesPath()
|
|||
|
||||
tmp.AppendDir( "template" );
|
||||
|
||||
return tmp.GetPath();
|
||||
return tmp.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
|
@ -227,6 +227,7 @@ void PATHS::EnsureUserPathsExist()
|
|||
EnsurePathExists( GetUserPluginsPath() );
|
||||
EnsurePathExists( GetUserPlugins3DPath() );
|
||||
EnsurePathExists( GetUserScriptingPath() );
|
||||
EnsurePathExists( GetUserTemplatesPath() );
|
||||
EnsurePathExists( GetDefaultUserProjectsPath() );
|
||||
EnsurePathExists( GetDefaultUserSymbolsPath() );
|
||||
EnsurePathExists( GetDefaultUserFootprintsPath() );
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <confirm.h>
|
||||
#include <gestfich.h>
|
||||
#include <page_layout/ws_data_model.h>
|
||||
#include <paths.h>
|
||||
#include <widgets/infobar.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
|
@ -177,8 +178,10 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
|||
|
||||
case wxID_SAVEAS:
|
||||
{
|
||||
wxFileDialog openFileDialog( this, _( "Save As" ), wxEmptyString, wxEmptyString,
|
||||
PageLayoutDescrFileWildcard(), wxFD_SAVE );
|
||||
wxString dir = PATHS::GetUserTemplatesPath();
|
||||
wxFileDialog openFileDialog( this, _( "Save As" ), dir, wxEmptyString,
|
||||
PageLayoutDescrFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue