From 513eaaa3556bc08c7ac9d03944ee35deff9d7ceb Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 20 May 2019 18:33:50 -0400 Subject: added const version of Settings::directInterface() for restoring states added top-level saveState() and restoreState() to ModInfoDialog that are called from MainWindow, because it now also has to handle expander states in the conflict tab added internal opened state to expander widget instead of using widget visibility so it can be saved even after the dialog is closed --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9108464f..89cb9f56 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2983,7 +2983,7 @@ void MainWindow::displayModInformation(ModInfo::Ptr modInfo, unsigned int index, dialog.openTab(tab); } - dialog.restoreTabState(m_OrganizerCore.settings().directInterface().value("mod_info_tabs").toByteArray()); + dialog.restoreState(m_OrganizerCore.settings()); QSettings &settings = m_OrganizerCore.settings().directInterface(); QString key = QString("geometry/%1").arg(dialog.objectName()); if (settings.contains(key)) { @@ -3001,7 +3001,7 @@ void MainWindow::displayModInformation(ModInfo::Ptr modInfo, unsigned int index, } dialog.exec(); - m_OrganizerCore.settings().directInterface().setValue("mod_info_tabs", dialog.saveTabState()); + dialog.saveState(m_OrganizerCore.settings()); settings.setValue(key, dialog.saveGeometry()); modInfo->saveMeta(); -- cgit v1.3.1