From: Michal MalĂ˝ Date: Fri, 13 Mar 2015 01:09:09 +0000 (+0100) Subject: Properly unset the selected sequence in MainWindow in case no other X-Git-Tag: 0.4b~1 X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=574183185727a2c5b7a9cd82414eac1eb5eef2e7;p=anyanka.git Properly unset the selected sequence in MainWindow in case no other valid sequence is available. --- 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());