From: Michal MalĂ˝ Date: Sun, 1 Mar 2015 13:17:41 +0000 (+0100) Subject: Save changes in all open sequences on "Save all sequences" action X-Git-Tag: 0.4a~16 X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=85d466fe0232707595e2a1c47e1519701de12f36;p=anyanka.git Save changes in all open sequences on "Save all sequences" action --- diff --git a/datamanager.cpp b/datamanager.cpp index 0e2b0ab..6209d8b 100644 --- a/datamanager.cpp +++ b/datamanager.cpp @@ -646,20 +646,19 @@ void DataManager::onSaveChanges() return; sr = m_activeSequence->selectedRun(); - sr->saveUserDataToJSON(); + saveSingleRunUserData(sr); } void DataManager::onSaveAllChanges() { - SingleRunsMap::iterator it; + for (NameSequencePair& p : m_sequences) { + std::shared_ptr s = p.second; + SingleRunsMap::iterator it = s->begin(); - if (m_activeSequence == nullptr) - return; - - it = m_activeSequence->begin(); - while (it != m_activeSequence->end()) { - it->second->saveUserDataToJSON(); - it++; + while (it != s->end()) { + saveSingleRunUserData(it->second); + it++; + } } }