Don't initialize Properties widget size until window is shown

PR #19328.
Closes #19322.
This commit is contained in:
Vladimir Golovnev 2023-07-18 15:06:27 +03:00 committed by Vladimir Golovnev (glassez)
parent 66777f3304
commit 5bb02cbd90
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
2 changed files with 7 additions and 2 deletions

View file

@ -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)
{
// preparations before showing the window
if (m_neverShown)
{
m_propertiesWidget->readSettings();
m_neverShown = false;
}
if (currentTabWidget() == m_transferListWidget)
m_propertiesWidget->loadDynamicData();

View file

@ -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;