Skip to content

Commit

Permalink
Refs #10302 Allow Refl UI rows to be reordered
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Oct 13, 2014
1 parent 1378d6c commit 239d6c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Code/Mantid/MantidQt/CustomInterfaces/src/QtReflMainView.cpp
Expand Up @@ -47,6 +47,7 @@ namespace MantidQt
ui.progressBar->setRange(0, 100);
ui.progressBar->setValue(0);

//Set up the instrument selectors
std::vector<std::string> instruments;
instruments.push_back("INTER");
instruments.push_back("SURF");
Expand All @@ -55,14 +56,16 @@ namespace MantidQt
setInstrumentList(instruments);

const std::string defaultInst = Mantid::Kernel::ConfigService::Instance().getString("default.instrument");

if(std::find(instruments.begin(), instruments.end(), defaultInst) != instruments.end())
{
int index = ui.comboSearchInstrument->findData(QString::fromStdString(defaultInst), Qt::DisplayRole);
ui.comboSearchInstrument->setCurrentIndex(index);
ui.comboProcessInstrument->setCurrentIndex(index);
}

//Allow rows to be reordered
ui.viewTable->verticalHeader()->setMovable(true);

connect(ui.workspaceSelector,SIGNAL(activated(QString)),this,SLOT(setModel(QString)));
connect(ui.buttonSave, SIGNAL(clicked()),this, SLOT(saveButton()));
connect(ui.buttonSaveAs, SIGNAL(clicked()),this, SLOT(saveAsButton()));
Expand Down

0 comments on commit 239d6c7

Please sign in to comment.