Mercurial > octave
comparison libgui/src/main-window.cc @ 27312:b9a436b0400e
save and restore last geometry of load path dialog
* gui-preferences.h: define key and emtpy default for path dialog geometry
* main-window.cc (prepare_to_exit): save settings of path dialog if the
related pointer is valid
* set-path-dialog.cc: include gui-preferences.h with new preference key;
(set_path_dialog): restore last geometry from preferences file;
(save_settings): new method for saving geoemtry and possibly other
preferences when the dialog is closed or when octave is about to quit;
(closeEvent) reimplement close event for saving settings before closing
* set-path-dialog.h: new method save_settings, new protected close event
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 04 Aug 2019 20:53:17 +0200 |
parents | 0040b7668518 |
children | 50216d7a2f6b |
comparison
equal
deleted
inserted
replaced
27311:0040b7668518 | 27312:b9a436b0400e |
---|---|
925 // Find files dialog is constructed dynamically, not at time of main_window | 925 // Find files dialog is constructed dynamically, not at time of main_window |
926 // construction. Connecting it to qApp aboutToQuit signal would have | 926 // construction. Connecting it to qApp aboutToQuit signal would have |
927 // caused it to run after QSettings deleted. | 927 // caused it to run after QSettings deleted. |
928 if (m_find_files_dlg) | 928 if (m_find_files_dlg) |
929 m_find_files_dlg->save_settings (); | 929 m_find_files_dlg->save_settings (); |
930 | |
931 if (m_set_path_dlg) | |
932 m_set_path_dlg->save_settings (); | |
930 | 933 |
931 write_settings (); | 934 write_settings (); |
932 } | 935 } |
933 | 936 |
934 void main_window::reset_windows (void) | 937 void main_window::reset_windows (void) |