~stol/kicad/bug1450795

« back to all changes in this revision

Viewing changes to eeschema/lib_export.cpp

  • Committer: Wayne Stambaugh
  • Date: 2015-09-25 19:38:09 UTC
  • Revision ID: stambaughw@verizon.net-20150925193809-ld3pik4nck8qbvnl
Default and most recently used path fixes. (fixes: 1494210)

* Rename Eda_FileSelector to EDA_FILE_SELECTOR.
* Add optional pointer to wxString to save the most recently used path to EDA_FILE_SELECTOR.
* Rename Eda_DirectorySelector to EDA_PATH_SELECTOR.
* Replace wxGetCwd() with wxStandardPaths::GetDocumentsDir().  This fixes the windows issue
  where wxGetCwd() returns the path where the executable files are located.
* Add code to handle most recently used path to EDA_BASE_FRAME.
* Fix string formatting error in kicad/files-io.cpp.
* Remove setting and restoring current working directory when launching GerbView.  Setting the CWD
  has no effect on the launched executable which starts with it's own CWD.
* Allow project path to be passed to GerbView when launched from KiCad.
* Note: this is a work in progress.  Do not expect every path and/or file selection dialog to properly
  update the most recently used path.  The correct solution to this problem requires a much more
  well though out solution which will not happen until after the next stable release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    m_lastDrawItem = NULL;
50
50
 
51
51
    wxFileDialog dlg( this, _( "Import Component" ), m_lastLibImportPath,
52
 
                      wxEmptyString, SchematicLibraryFileWildcard,
 
52
                      m_mruPath, SchematicLibraryFileWildcard,
53
53
                      wxFD_OPEN | wxFD_FILE_MUST_EXIST );
54
54
 
55
55
    if( dlg.ShowModal() == wxID_CANCEL )
57
57
 
58
58
    wxFileName  fn = dlg.GetPath();
59
59
 
 
60
    m_mruPath = fn.GetPath();
 
61
 
60
62
    std::auto_ptr<PART_LIB> lib;
61
63
 
62
64
    try