diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h index 1b2790bc9495eb75b04d91f7a79c32e367895235..f2dec7b7339bda871059256f684e146be31aabbb 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h @@ -137,7 +137,7 @@ private: QPushButton *m_zoom; ///< Button switching on navigation mode QPushButton *m_one; ///< Button switching on single detector selection mode QPushButton *m_tube; ///< Button switching on detector's parent selection mode - QPushButton *m_peak; ///< Button switching on peak creation mode + QPushButton *m_peakAdd; ///< Button switching on peak creation mode QPushButton *m_peakErase; ///< Button switching on peak erase mode QPushButton *m_peakCompare; ///< Button switching on peak comparison mode QPushButton *m_peakAlign; ///< Button switching on peak alignment mode diff --git a/qt/widgets/instrumentview/src/InstrumentWidgetDecoder.cpp b/qt/widgets/instrumentview/src/InstrumentWidgetDecoder.cpp index 3264e1821a6d6adac6578bc3679777f45cd261be..14191b6a6253a65100282bb2b66392c396f07924 100644 --- a/qt/widgets/instrumentview/src/InstrumentWidgetDecoder.cpp +++ b/qt/widgets/instrumentview/src/InstrumentWidgetDecoder.cpp @@ -173,7 +173,7 @@ void InstrumentWidgetDecoder::decodePickTab(const QMap<QString, QVariant> &map, obj->m_free_draw->setChecked(map[QString("freeDraw")].toBool()); obj->m_one->setChecked(map[QString("one")].toBool()); obj->m_tube->setChecked(map[QString("tube")].toBool()); - obj->m_peak->setChecked(map[QString("peak")].toBool()); + obj->m_peakAdd->setChecked(map[QString("peakAdd")].toBool()); obj->m_peakErase->setChecked(map[QString("peakErase")].toBool()); } diff --git a/qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp b/qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp index b6f9ed247a90253bd0bfc9d17dc92e5351144a40..32afb27febaaf62417d7bbb42af98bb0795a8b5f 100644 --- a/qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp +++ b/qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp @@ -207,7 +207,7 @@ InstrumentWidgetEncoder::encodePickTab(const InstrumentWidgetPickTab *tab) { map.insert(QString("freeDraw"), QVariant(tab->m_free_draw->isChecked())); map.insert(QString("one"), QVariant(tab->m_one->isChecked())); map.insert(QString("tube"), QVariant(tab->m_tube->isChecked())); - map.insert(QString("peak"), QVariant(tab->m_peak->isChecked())); + map.insert(QString("peakAdd"), QVariant(tab->m_peakAdd->isChecked())); map.insert(QString("peakErase"), QVariant(tab->m_peakErase->isChecked())); return map; diff --git a/qt/widgets/instrumentview/src/InstrumentWidgetPickTab.cpp b/qt/widgets/instrumentview/src/InstrumentWidgetPickTab.cpp index 745a0bfa3227dbafc3dbd9efae88604a880c4664..95a93625502231cfe18974a8c46232ec3a4e91fa 100644 --- a/qt/widgets/instrumentview/src/InstrumentWidgetPickTab.cpp +++ b/qt/widgets/instrumentview/src/InstrumentWidgetPickTab.cpp @@ -236,11 +236,11 @@ InstrumentWidgetPickTab::InstrumentWidgetPickTab(InstrumentWidget *instrWidget) m_edit->setIcon(QIcon(":/PickTools/selection-edit.png")); m_edit->setToolTip("Edit a shape"); - m_peak = new QPushButton(); - m_peak->setCheckable(true); - m_peak->setAutoExclusive(true); - m_peak->setIcon(QIcon(":/PickTools/selection-peak.png")); - m_peak->setToolTip("Add single crystal peak"); + m_peakAdd = new QPushButton(); + m_peakAdd->setCheckable(true); + m_peakAdd->setAutoExclusive(true); + m_peakAdd->setIcon(QIcon(":/PickTools/selection-peak.png")); + m_peakAdd->setToolTip("Add single crystal peak"); m_peakErase = new QPushButton(); m_peakErase->setCheckable(true); @@ -271,7 +271,7 @@ InstrumentWidgetPickTab::InstrumentWidgetPickTab(InstrumentWidget *instrWidget) toolBox->addWidget(m_free_draw, 0, 7); toolBox->addWidget(m_one, 1, 0); toolBox->addWidget(m_tube, 1, 1); - toolBox->addWidget(m_peak, 1, 2); + toolBox->addWidget(m_peakAdd, 1, 2); toolBox->addWidget(m_peakErase, 1, 3); toolBox->addWidget(m_peakCompare, 1, 4); toolBox->addWidget(m_peakAlign, 1, 5); @@ -280,7 +280,7 @@ InstrumentWidgetPickTab::InstrumentWidgetPickTab(InstrumentWidget *instrWidget) connect(m_zoom, SIGNAL(clicked()), this, SLOT(setSelectionType())); connect(m_one, SIGNAL(clicked()), this, SLOT(setSelectionType())); connect(m_tube, SIGNAL(clicked()), this, SLOT(setSelectionType())); - connect(m_peak, SIGNAL(clicked()), this, SLOT(setSelectionType())); + connect(m_peakAdd, SIGNAL(clicked()), this, SLOT(setSelectionType())); connect(m_peakErase, SIGNAL(clicked()), this, SLOT(setSelectionType())); connect(m_peakCompare, SIGNAL(clicked()), this, SLOT(setSelectionType())); connect(m_peakAlign, SIGNAL(clicked()), this, SLOT(setSelectionType())); @@ -313,7 +313,7 @@ void InstrumentWidgetPickTab::collapsePlotPanel() { * Returns true if the plot can be updated when the mouse moves over detectors */ bool InstrumentWidgetPickTab::canUpdateTouchedDetector() const { - return !m_peak->isChecked(); + return !m_peakAdd->isChecked(); } /** @@ -444,7 +444,7 @@ void InstrumentWidgetPickTab::setSelectionType() { if (plotType < DetectorPlotController::TubeSum) { plotType = DetectorPlotController::TubeSum; } - } else if (m_peak->isChecked()) { + } else if (m_peakAdd->isChecked()) { m_selectionType = AddPeak; m_activeTool->setText("Tool: Add a single crystal peak"); surfaceMode = ProjectionSurface::AddPeakMode; @@ -717,7 +717,7 @@ void InstrumentWidgetPickTab::selectTool(const ToolType tool) { m_tube->setChecked(true); break; case PeakSelect: - m_peak->setChecked(true); + m_peakAdd->setChecked(true); break; case PeakCompare: m_peakCompare->setChecked(true); @@ -842,7 +842,7 @@ void InstrumentWidgetPickTab::loadFromProject(const std::string &lines) { std::vector<QPushButton *> buttons{ m_zoom, m_edit, m_ellipse, m_rectangle, m_ring_ellipse, m_ring_rectangle, m_free_draw, m_one, - m_tube, m_peak, m_peakErase}; + m_tube, m_peakAdd, m_peakErase}; tab.selectLine("ActiveTools"); for (auto button : buttons) { @@ -868,7 +868,7 @@ std::string InstrumentWidgetPickTab::saveToProject() const { std::vector<QPushButton *> buttons{ m_zoom, m_edit, m_ellipse, m_rectangle, m_ring_ellipse, m_ring_rectangle, m_free_draw, m_one, - m_tube, m_peak, m_peakErase}; + m_tube, m_peakAdd, m_peakErase}; tab.writeLine("ActiveTools"); for (auto button : buttons) {