diff --git a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp index a1a3584c9eb1a6f94255b996e862d382ab7c5760..8a0b98c070c86a3e0538f147a39fa086c68d0331 100644 --- a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp +++ b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp @@ -20,6 +20,21 @@ using MantidQt::MantidWidgets::MuonFitPropertyBrowser; namespace { Logger g_log("MuonSequentialFitDialog"); +std::string removePath(const std::string &labelIn) { + size_t path = labelIn.find_last_of("/"); + if (path == std::string::npos) { + path = labelIn.find_last_of('\\'); + } + std::string useThisLabel = labelIn; + if (path != std::string::npos) { + path = path + 1; + size_t end = labelIn.find_last_of("."); + useThisLabel = labelIn.substr(path); + useThisLabel = useThisLabel.substr(0, end - path); + auto test = useThisLabel; + } + return useThisLabel; +} } const std::string MuonSequentialFitDialog::SEQUENTIAL_PREFIX("MuonSeqFit_"); @@ -328,7 +343,7 @@ void MuonSequentialFitDialog::continueFit() { // Get names of workspaces to fit const auto wsNames = m_dataPresenter->generateWorkspaceNames( m_ui.runs->getInstrumentOverride().toStdString(), - m_ui.runs->getText().toStdString(), false); + removePath(m_ui.runs->getText().toStdString()), false); if (wsNames.size() == 0) { QMessageBox::critical( this, "No data to fit",