diff --git a/qt/widgets/common/src/WorkspacePresenter/QWorkspaceDockView.cpp b/qt/widgets/common/src/WorkspacePresenter/QWorkspaceDockView.cpp index 7712fe80493284b71ab3f1f64fd87bc9aecf6508..5dbef3e68f0794b8e8d7d347aae36e0b1daac984 100644 --- a/qt/widgets/common/src/WorkspacePresenter/QWorkspaceDockView.cpp +++ b/qt/widgets/common/src/WorkspacePresenter/QWorkspaceDockView.cpp @@ -915,9 +915,21 @@ void QWorkspaceDockView::addMatrixWorkspaceMenuItems( menu->addAction(m_plotAdvanced); // Don't plot a spectrum if only one X value - m_plotSpec->setEnabled(matrixWS->blocksize() > 1); - m_plotSpecErr->setEnabled(matrixWS->blocksize() > 1); - m_plotAdvanced->setEnabled(matrixWS->blocksize() > 1); + bool multipleBins = false; + try { + multipleBins = (matrixWS->blocksize() > 1); + } catch (...) { + const size_t numHist = matrixWS->getNumberHistograms(); + for (size_t i = 0; i < numHist; ++i) { + if (matrixWS->y(i).size() > 1) { + multipleBins = true; + break; + } + } + } + m_plotSpec->setEnabled(multipleBins); + m_plotSpecErr->setEnabled(multipleBins); + m_plotAdvanced->setEnabled(multipleBins); menu->addAction(m_showSpectrumViewer); // The 2D spectrum viewer