X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingsdlg.cpp;h=0b372f62f49f167d6f8f748bf7e6a65117669c21;hp=b5fc125c2e1e131f2e021140b0e5b0c37dd04056;hb=da2b5b2e4e2b0ea1847a0a5f0cb4a3752fc655c9;hpb=569bfa97ac24d59a77c1debf92fce356c2dc5826 diff --git a/src/qtui/settingsdlg.cpp b/src/qtui/settingsdlg.cpp index b5fc125c..0b372f62 100644 --- a/src/qtui/settingsdlg.cpp +++ b/src/qtui/settingsdlg.cpp @@ -65,9 +65,9 @@ void SettingsDlg::registerSettingsPage(SettingsPage *sp) { QTreeWidgetItem *item = new QTreeWidgetItem(cat, QStringList(sp->title())); treeItems[sp] = item; pages[QString("%1$%2").arg(sp->category(), sp->title())] = sp; - sp->load(); + pageIsLoaded[sp] = false; // TESTING - selectPage(sp->category(), sp->title()); + // selectPage(sp->category(), sp->title()); } void SettingsDlg::selectPage(const QString &cat, const QString &title) { @@ -78,6 +78,10 @@ void SettingsDlg::selectPage(const QString &cat, const QString &title) { ui.settingsTree->setCurrentItem(0); return; } + if(!pageIsLoaded[sp]) { + sp->load(); + pageIsLoaded[sp] = true; + } if(sp != currentPage() && currentPage() != 0 && currentPage()->hasChanged()) { int ret = QMessageBox::warning(this, tr("Save changes"), tr("There are unsaved changes on the current configuration page. Would you like to apply your changes now?"),