Mercurial > octave
diff libgui/src/main-window.h @ 29147:5d7a651bf0bb stable
fix error when restoring previous main window layout (bug #59426)
* default-qt-settings.in: remove default settings for dock widgets
* gui-preferences-mw.h: remove default values for main window
geometry and state
* main-window.cc: (reset_windows): slot for resetting layout action
now calling the new member function do_reset_windows;
(set_window_layout): calling new member function do_reset_windows
when geometry or state are not yet available from the settings file,
set size to screen size if state was maximized, the settings pointer
now is always valid so no further checks are required;
(construct_central_widget): size for hidden central widget is fixed;
(construct): window layout and adding the dock widget is moved into
the new member function do_reset_windows;
(resize_dock): new member function resizing a docked widget either
by resizeDocks (since Qt 5.6) or by a not very reliable replacement;
(do_reset_windows): new member function setting the default size of
the main window, adding all widget, resize the terminal widget to the
default size, showing everything if the argument is true (default)
and storing size and state of main window
* main-window.h (do_reset_windows, resize_dock): new member functions
* octave-dock-widget.cc (make_widget): fix indentation;
* acinclude.m4: add test for QMainWindow::resizeDocks ()
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sun, 06 Dec 2020 13:53:30 +0100 |
parents | 7220b59c490b |
children | d9ac99164c18 0a5b15007766 |
line wrap: on
line diff
--- a/libgui/src/main-window.h Fri Dec 04 22:50:37 2020 +0100 +++ b/libgui/src/main-window.h Sun Dec 06 13:53:30 2020 +0100 @@ -162,6 +162,7 @@ void prepare_to_exit (void); void go_to_previous_widget (void); void reset_windows (void); + void do_reset_windows (bool show_it = true); void update_octave_directory (const QString& dir); void browse_for_directory (void); @@ -298,6 +299,7 @@ void get_screen_geometry (int *width, int *height); void set_default_geometry (void); + void resize_dock (QDockWidget *dw, int width, int height); base_qobject& m_octave_qobj;