Make cmake-gui remember whether the "Advanced" checkbox was checked or not

Alex
This commit is contained in:
Alex Neundorf 2010-09-23 21:48:07 +02:00
parent 8e8acb7aab
commit 3d13502c98
1 changed files with 7 additions and 0 deletions

View File

@ -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()