From 3d13502c986e43f070366d04891c8a3da05e2cb8 Mon Sep 17 00:00:00 2001
From: Alex Neundorf <neundorf@kde.org>
Date: Thu, 23 Sep 2010 21:48:07 +0200
Subject: Make cmake-gui remember whether the "Advanced" checkbox was checked
 or not

Alex
---
 Source/QtDialog/CMakeSetupDialog.cxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 7207a8a..29fcfc0 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -84,6 +84,10 @@ CMakeSetupDialog::CMakeSetupDialog()
   this->setGroupedView(groupView);
   this->groupedCheck->setCheckState(groupView ? Qt::Checked : Qt::Unchecked);
 
+  bool advancedView = settings.value("AdvancedView", false).toBool();
+  this->setAdvancedView(advancedView);
+  this->advancedCheck->setCheckState(advancedView?Qt::Checked : Qt::Unchecked);
+
   QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
   this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
   QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)),
@@ -963,6 +967,9 @@ void CMakeSetupDialog::setGroupedView(bool v)
 void CMakeSetupDialog::setAdvancedView(bool v)
 {
   this->CacheValues->setShowAdvanced(v);
+  QSettings settings;
+  settings.beginGroup("Settings/StartPath");
+  settings.setValue("AdvancedView", v);
 }
 
 void CMakeSetupDialog::showUserChanges()
-- 
cgit v0.12