Skip to content
Snippets Groups Projects
Commit 265c8f81 authored by Robert Applin's avatar Robert Applin
Browse files

Get selected spectrum number not combobox index Refs #23225

parent bc8701f2
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
#include "MantidQtWidgets/Common/SignalBlocker.h"
#include <boost/numeric/conversion/cast.hpp>
#include <string>
namespace MantidQt {
namespace CustomInterfaces {
......@@ -37,7 +38,10 @@ IndirectFitPlotView::~IndirectFitPlotView() {}
std::size_t IndirectFitPlotView::getSelectedSpectrum() const {
if (m_plotForm->swPlotSpectrum->currentIndex() == 0)
return m_plotForm->spPlotSpectrum->value();
return m_plotForm->cbPlotSpectrum->currentIndex();
if (m_plotForm->cbPlotSpectrum->count() != 0)
return boost::numeric_cast<std::size_t>(
std::stoi(m_plotForm->cbPlotSpectrum->currentText().toStdString()));
return 0;
}
int IndirectFitPlotView::getSelectedSpectrumIndex() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment