Skip to content

Commit

Permalink
Refs #8534. Minor UI fix.
Browse files Browse the repository at this point in the history
Problems when updating plot on focusLost(). Plus same signal was
connected twice in different places.
  • Loading branch information
arturbekasov committed Dec 4, 2013
1 parent 117a034 commit dd97461
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
3 changes: 0 additions & 3 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3525,9 +3525,6 @@ void MuonAnalysis::connectAutoUpdate()
connect(m_uiForm.pairTablePlotChoice, SIGNAL(currentIndexChanged(int)), this, SLOT(groupTabUpdatePair()));

// Settings tab Auto Updates
connect(m_uiForm.binBoundaries, SIGNAL(editingFinished()), this, SLOT(settingsTabUpdatePlot()));
connect(m_uiForm.optionStepSizeText, SIGNAL(editingFinished()), this, SLOT(settingsTabUpdatePlot()));

connect(m_optionTab, SIGNAL(settingsTabUpdatePlot()), this, SLOT(settingsTabUpdatePlot()));
connect(m_optionTab, SIGNAL(plotStyleChanged()), this, SLOT(updateCurrentPlotStyle()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,10 @@ void MuonAnalysisOptionTab::initLayout()
connect(m_uiForm.showErrorBars, SIGNAL(toggled(bool)), this, SLOT(errorBarsChanged(bool)));
connect(m_uiForm.hideToolbars, SIGNAL(toggled(bool)), this, SLOT(toolbarsChanged(bool)));
connect(m_uiForm.hideGraphs, SIGNAL(toggled(bool)), this, SLOT(hideGraphsChanged(bool)));

////////////// Data Binning slots ///////////////
connect(m_uiForm.rebinComboBox, SIGNAL(currentIndexChanged(int)), this,
SLOT(runRebinComboBox(int)));
connect(m_uiForm.optionStepSizeText, SIGNAL(lostFocus()), this,
SLOT(runOptionStepSizeText()));
connect(m_uiForm.binBoundaries, SIGNAL(lostFocus()), this,
SLOT(runBinBoundaries()));
connect(m_uiForm.rebinComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(runRebinComboBox(int)));
connect(m_uiForm.optionStepSizeText, SIGNAL(returnPressed()), this, SLOT(runOptionStepSizeText()));
connect(m_uiForm.binBoundaries, SIGNAL(returnPressed()), this, SLOT(runBinBoundaries()));

////////////// Auto-update plot style //////////////
connect(m_uiForm.connectPlotType, SIGNAL(currentIndexChanged(int)), this, SIGNAL(plotStyleChanged()));
Expand All @@ -85,9 +81,6 @@ void MuonAnalysisOptionTab::initLayout()
connect(m_uiForm.timeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.timeAxisStartAtInput, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.timeAxisFinishAtInput, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.optionStepSizeText, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.rebinComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.binBoundaries, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));

// Save settings
connect(m_uiForm.timeAxisStartAtInput, SIGNAL(editingFinished()), this, SLOT(storeCustomTimeValue()));
Expand Down Expand Up @@ -132,6 +125,8 @@ void MuonAnalysisOptionTab::runRebinComboBox(int index)
QSettings group;
group.beginGroup(m_settingsGroup + "BinningOptions");
group.setValue("rebinComboBoxIndex", index);

emit settingsTabUpdatePlot();
}


Expand All @@ -147,6 +142,8 @@ void MuonAnalysisOptionTab::runOptionStepSizeText()
QSettings group;
group.beginGroup(m_settingsGroup + "BinningOptions");
group.setValue("constStepSize", boevs);

emit settingsTabUpdatePlot();
}
catch (...)
{
Expand All @@ -164,6 +161,8 @@ void MuonAnalysisOptionTab::runBinBoundaries()
QSettings group;
group.beginGroup(m_settingsGroup + "BinningOptions");
group.setValue("rebinVariable", m_uiForm.binBoundaries->text());

emit settingsTabUpdatePlot();
}


Expand Down

0 comments on commit dd97461

Please sign in to comment.