eeschema: remember last browsed directory in the Symbol Lib Table dialog
This commit is contained in:
parent
5f2e9a1e57
commit
7a6e3bf3ed
|
@ -353,9 +353,15 @@ void DIALOG_SYMBOL_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
||||||
wxEmptyString, SchematicLibraryFileWildcard(),
|
wxEmptyString, SchematicLibraryFileWildcard(),
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
dlg.SetDirectory( m_lastBrowseDir );
|
||||||
|
|
||||||
|
auto result = dlg.ShowModal();
|
||||||
|
|
||||||
|
if( result == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_lastBrowseDir = dlg.GetDirectory();
|
||||||
|
|
||||||
wxArrayString files;
|
wxArrayString files;
|
||||||
dlg.GetFilenames( files );
|
dlg.GetFilenames( files );
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ private:
|
||||||
|
|
||||||
wxGrid* m_cur_grid; ///< changed based on tab choice
|
wxGrid* m_cur_grid; ///< changed based on tab choice
|
||||||
static int m_pageNdx; ///< Remember the last notebook page selected during a session
|
static int m_pageNdx; ///< Remember the last notebook page selected during a session
|
||||||
|
|
||||||
|
wxString m_lastBrowseDir; ///< last browsed directory
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _DIALOG_SYM_LIB_TABLE_H_
|
#endif // _DIALOG_SYM_LIB_TABLE_H_
|
||||||
|
|
Loading…
Reference in New Issue