mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
Don't resize dialog with invalid sizes
This fixes wrong dialog sizes on first startup.
This commit is contained in:
parent
3fd0241abb
commit
fcf50820e8
21 changed files with 64 additions and 64 deletions
|
@ -572,10 +572,8 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||
|
||||
m_ui->tabSelection->setCurrentRow(m_storeLastViewedPage);
|
||||
|
||||
resize(m_storeDialogSize);
|
||||
|
||||
// Have to be called after show(), because splitter width needed
|
||||
loadSplitterState();
|
||||
if (const QSize dialogSize = m_storeDialogSize; dialogSize.isValid())
|
||||
resize(dialogSize);
|
||||
}
|
||||
|
||||
void OptionsDialog::initializeLanguageCombo()
|
||||
|
@ -646,6 +644,13 @@ void OptionsDialog::loadSplitterState()
|
|||
m_ui->hsplitter->setSizes(splitterSizes);
|
||||
}
|
||||
|
||||
void OptionsDialog::showEvent(QShowEvent *e)
|
||||
{
|
||||
QDialog::showEvent(e);
|
||||
|
||||
loadSplitterState();
|
||||
}
|
||||
|
||||
void OptionsDialog::saveOptions()
|
||||
{
|
||||
auto *pref = Preferences::instance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue