Mercurial > octave
changeset 25906:e980aef0e1db
do sync file browser when settings change (bug #54718)
* files-dock-widget.cc (files_doc_widget::notice_settings):
Call do_sync_browser_directory if m_sync_octave_dir is true.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 27 Sep 2018 14:35:00 -0400 |
parents | 25726930dd35 |
children | 0146d16055a8 |
files | libgui/src/files-dock-widget.cc |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/files-dock-widget.cc Thu Sep 27 12:57:51 2018 -0400 +++ b/libgui/src/files-dock-widget.cc Thu Sep 27 14:35:00 2018 -0400 @@ -832,6 +832,15 @@ = settings->value (fb_sync_octdir.key, fb_sync_octdir.def).toBool (); m_sync_octave_directory_action->setEnabled (! m_sync_octave_dir); m_sync_browser_directory_action->setEnabled (! m_sync_octave_dir); + + // If m_sync_octave_dir is enabled, then we want the file browser to + // update to match the current working directory of the + // interpreter. We don't want to queue any signal to change the + // interpreter's current working directory. In this case, we just + // want the GUI to match the state of the interpreter. + + if (m_sync_octave_dir) + do_sync_browser_directory (); } void files_dock_widget::popdownmenu_home (bool)