From 574183185727a2c5b7a9cd82414eac1eb5eef2e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Fri, 13 Mar 2015 02:09:09 +0100 Subject: [PATCH] Properly unset the selected sequence in MainWindow in case no other valid sequence is available. --- datamanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datamanager.cpp b/datamanager.cpp index 63ace31..d788cde 100644 --- a/datamanager.cpp +++ b/datamanager.cpp @@ -716,9 +716,6 @@ void DataManager::onSequenceSelected(const QString& key) return; } - if (seq == m_activeSequence) - return; - if (seq->count() < 1) { Logger::log(Logger::Level::ERROR, ME_SENDER_STR, __QFUNC__ + "There are no runs in sequence [" + key + "]."); QMessageBox::information(nullptr, "Data manager", "Sequence '" + key + "' does not contain any runs."); @@ -730,6 +727,9 @@ void DataManager::onSequenceSelected(const QString& key) return; } + if (seq == m_activeSequence) + return; + m_activeSequence = seq; m_prevSequenceKey = stdKey; m_singleSelModel.setSingleRuns(m_activeSequence->allRunKeys()); -- 2.43.5