diff base/ViewManager.cpp @ 10:ec6886f0e673

* Fix update and play limits for play-selection mode when not looping * Fix playback in loop mode when no selection -- but the GUI update for this is still wrong on the flyback * Various fixes and improvements to making selections, particularly during playback * Draw selection under non-opaque non-scrollable layers, so as to improve cacheing * Show selection limits as text when drawing selection * Allow user to find missing audio files when loading session * Cross-fade selections when in play-selection mode -- mostly. We don't cross-fade on a processing block boundary, and unfortunately with short selections the selection boundary is quite likely to coincide with a block boundary.
author Chris Cannam
date Wed, 25 Jan 2006 17:46:28 +0000
parents 73d85d19919f
children cc98d496d52b
line wrap: on
line diff
--- a/base/ViewManager.cpp	Tue Jan 24 16:20:58 2006 +0000
+++ b/base/ViewManager.cpp	Wed Jan 25 17:46:28 2006 +0000
@@ -138,17 +138,19 @@
     //simply overlaps one of them (cutting down the original selection
     //appropriately)
 
-    m_selections.erase(selection);
-
-    emit selectionChanged();
+    if (m_selections.find(selection) != m_selections.end()) {
+	m_selections.erase(selection);
+	emit selectionChanged();
+    }
 }
 
 void
 ViewManager::clearSelections()
 {
-    m_selections.clear();
-
-    emit selectionChanged();
+    if (!m_selections.empty()) {
+	m_selections.clear();
+	emit selectionChanged();
+    }
 }
 
 Selection
@@ -226,6 +228,12 @@
 }
 
 void
+ViewManager::playStatusChanged(bool playing)
+{
+    checkPlayStatus();
+}
+
+void
 ViewManager::checkPlayStatus()
 {
     if (m_playSource && m_playSource->isPlaying()) {