# HG changeset patch # User John W. Eaton # Date 1367130559 14400 # Node ID 0eca6c5657c9cf08e1e137a04733ca870dd15604 # Parent 02a90cb9d79f5a95656541cf6068a77561338f81 force focus to command window after browsing for directory * main-window.cc (main_window::browse_for_directory): Call set_current_working_directory for consistency with other directory changing functions. Force focus to command window to avoid problem on Windows systems. diff -r 02a90cb9d79f -r 0eca6c5657c9 libgui/src/main-window.cc --- a/libgui/src/main-window.cc Sun Apr 28 01:49:03 2013 -0400 +++ b/libgui/src/main-window.cc Sun Apr 28 02:29:19 2013 -0400 @@ -352,13 +352,15 @@ void main_window::browse_for_directory (void) { - QString dir = - QFileDialog::getExistingDirectory (this, tr ("Set working directory")); + QString dir + = QFileDialog::getExistingDirectory (this, tr ("Set working directory")); + + set_current_working_directory (dir); - if (! dir.isEmpty ()) - octave_link::post_event (this, - &main_window::change_directory_callback, - dir.toStdString ()); + // FIXME -- on Windows systems, the command window freezes after the + // previous actions. Forcing the focus appears to unstick it. + + focus_command_window (); } void