Browse Source

Don't initialize Properties widget size until window is shown

PR #19328.
Closes #19322.
adaptive-webui-19844
Vladimir Golovnev 1 year ago committed by GitHub
parent
commit
4a217dc42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/gui/mainwindow.cpp
  2. 1
      src/gui/mainwindow.h

8
src/gui/mainwindow.cpp

@ -455,8 +455,6 @@ MainWindow::MainWindow(IGUIApplication *app, WindowState initialState) @@ -455,8 +455,6 @@ MainWindow::MainWindow(IGUIApplication *app, WindowState initialState)
}
#endif
m_propertiesWidget->readSettings();
const bool isFiltersSidebarVisible = pref->isFiltersSidebarVisible();
m_ui->actionShowFiltersSidebar->setChecked(isFiltersSidebarVisible);
if (isFiltersSidebarVisible)
@ -1092,6 +1090,12 @@ void MainWindow::showEvent(QShowEvent *e) @@ -1092,6 +1090,12 @@ void MainWindow::showEvent(QShowEvent *e)
{
// preparations before showing the window
if (m_neverShown)
{
m_propertiesWidget->readSettings();
m_neverShown = false;
}
if (currentTabWidget() == m_transferListWidget)
m_propertiesWidget->loadDynamicData();

1
src/gui/mainwindow.h

@ -202,6 +202,7 @@ private: @@ -202,6 +202,7 @@ private:
QFileSystemWatcher *m_executableWatcher = nullptr;
// GUI related
bool m_posInitialized = false;
bool m_neverShown = true;
QPointer<QTabWidget> m_tabs;
QPointer<StatusBar> m_statusBar;
QPointer<OptionsDialog> m_options;

Loading…
Cancel
Save