]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Properly unset the selected sequence in MainWindow in case no other
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 13 Mar 2015 01:09:09 +0000 (02:09 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 13 Mar 2015 01:09:09 +0000 (02:09 +0100)
valid sequence is available.

datamanager.cpp

index 63ace31df0009d1aabd5ca15f98879c9db4460fe..d788cde2a3e855557b8b3aa4d78309ac2a08996e 100644 (file)
@@ -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());