Commit 0482a0ba authored by Joseph Torsney's avatar Joseph Torsney
Browse files

Check if tab selected on integration range change re30894

parent 8e31f731
......@@ -160,6 +160,8 @@ public:
/// Get the currently selected tab index
int getCurrentTab() const;
/// Decides whether the given tab is the tab currently open
bool isCurrentTab(InstrumentWidgetTab* tab) const;
/// Load the widget from a Mantid project file.
void loadFromProject(const std::string &lines);
/// Save the widget to a Mantid projecy file.
......
......@@ -1611,6 +1611,10 @@ int InstrumentWidget::getCurrentTab() const {
return mControlsTab->currentIndex();
}
bool InstrumentWidget::isCurrentTab(InstrumentWidgetTab* tab) const {
return this->getCurrentTab() == mControlsTab->indexOf(tab);
}
/**
* Save the state of the instrument widget to a project file.
* @return string representing the current state of the instrumet widget.
......
......@@ -1338,7 +1338,10 @@ void InstrumentWidgetMaskTab::storeMask() {
void InstrumentWidgetMaskTab::changedIntegrationRange(double /*unused*/,
double /*unused*/) {
enableApplyButtons();
InstrumentWidgetTab* baseTab = this;
if (m_instrWidget->isCurrentTab(baseTab)) {
enableApplyButtons();
}
}
/** Load mask tab state from a Mantid project file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment