Mercurial > octave
changeset 33500:952bb22874fd
avoid restoring file browser header twice at startup
* files-dock-widget.cc (files_dock_widget::files_dock_widget): do not
restore header here;
(files_dock_widget::notice_settings): but only here, therefore move
related comment to here
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Wed, 01 May 2024 21:25:43 +0200 |
parents | 0f2257136d9c |
children | d8a3473c107a |
files | libgui/src/files-dock-widget.cc |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/files-dock-widget.cc Wed May 01 20:57:06 2024 +0200 +++ b/libgui/src/files-dock-widget.cc Wed May 01 21:25:43 2024 +0200 @@ -466,13 +466,6 @@ if (! p) make_window (); - - // Initialize column order and width of the file browser. From this post, - // https://www.qtcentre.org/threads/26675-QTableView-saving-restoring-columns-widths - // this might fail if done directly in the constructor. This effect shows - // up in the GUI since Qt 6.6.x. As a solution, the following timer ensures - // that the header is restored when the event loop is idle. - QTimer::singleShot (0, this, SLOT(restore_header_state ())); } void @@ -1141,7 +1134,12 @@ if (m_sync_octave_dir) do_sync_browser_directory (); - // Restore column state in case the setting above somehow changed them + // Initialize column order, visibility and width of the file browser. From this post, + // https://www.qtcentre.org/threads/26675-QTableView-saving-restoring-columns-widths + // this might fail if done directly after other actions. This effect shows + // up in the GUI since Qt 6.6.x. As a solution, the following timer ensures + // that the header is restored when the event loop is idle. + QTimer::singleShot (0, this, SLOT(restore_header_state ())); }