Skip to content

Commit

Permalink
refs #5103. GUI preference options for ignore PV.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Apr 18, 2012
1 parent 8afa6cb commit 1a45988
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Code/Mantid/MantidPlot/src/ConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,15 @@ void ConfigDialog::initMantidPage()
//Here we only want the default instrument updated if the user clicks Ok/Apply
disconnect(defInstr, SIGNAL(currentIndexChanged(const QString&)), defInstr, SLOT(updateDefaultInstrument(const QString &)));

//Ignore paraview.
ckIgnoreParaView = new QCheckBox("Ignore ParaView");
ckIgnoreParaView->setToolTip("Don't bother me with anything to do with ParaView.\nRequires restart of MantidPlot to take effect.");
Mantid::Kernel::ConfigServiceImpl& conf = Mantid::Kernel::ConfigService::Instance();
const std::string ignoreParaViewProperty = "paraview.ignore";
bool ignoreParaView = conf.hasProperty(ignoreParaViewProperty) && bool(atoi(conf.getString(ignoreParaViewProperty).c_str()));
ckIgnoreParaView->setChecked(ignoreParaView);
grid->addWidget(ckIgnoreParaView, 3, 0);

// Populate boxes
Mantid::Kernel::ConfigServiceImpl & mantid_config = Mantid::Kernel::ConfigService::Instance();
QString property = QString::fromStdString(mantid_config.getString("supported.facilities"));
Expand Down Expand Up @@ -2066,6 +2075,8 @@ void ConfigDialog::apply()

mantid_config.setString("default.facility", facility->currentText().toStdString());
mantid_config.setString("default.instrument", defInstr->currentText().toStdString());
mantid_config.setString("paraview.ignore", QString::number(ckIgnoreParaView->isChecked()).toStdString());


updateDirSearchSettings();
updateCurveFitSettings();
Expand Down Expand Up @@ -2540,3 +2551,4 @@ void ConfigDialog::addParameterDir()
leParameterDir->setText(dir);
}
}

1 change: 1 addition & 0 deletions Code/Mantid/MantidPlot/src/ConfigDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class ConfigDialog : public QDialog
QWidget *instrumentPage;
QComboBox *facility;
MantidQt::MantidWidgets::InstrumentSelector *defInstr;
QCheckBox* ckIgnoreParaView;

/// Mantid tab for setting directories
QWidget *directoriesPage;
Expand Down

0 comments on commit 1a45988

Please sign in to comment.