diff view/View.cpp @ 224:9465b5375235

* Fix #1672407 confused by plugin-named files in cwd (or home?) * Fix #1491848 crash when loading new file while transform plugin runs * Fix #1502287 Background remains black after spectrogram layer deleted * Fix #1604477 Replacing the main audio file silences secondary audio file * Fix failure to initialise property box layout to last preference on startup * Fix resample/wrong-rate display in Pane, ensure that right rate is chosen if all current models have an acceptable rate even if previous main model had a different one * Fix "global zoom" broken in previous commit * Some fixes to spectrogram cache area updating (makes spectrogram appear more quickly, previously it had a tendency to refresh with empty space) * Fixes to colour 3d plot normalization
author Chris Cannam
date Thu, 08 Mar 2007 16:53:08 +0000
parents cd81066ac7ad
children 2ccd02015530
line wrap: on
line diff
--- a/view/View.cpp	Wed Mar 07 18:00:49 2007 +0000
+++ b/view/View.cpp	Thu Mar 08 16:53:08 2007 +0000
@@ -44,7 +44,6 @@
     m_followZoom(true),
     m_followPlay(PlaybackScrollPage),
     m_playPointerFrame(0),
-    m_lightBackground(true),
     m_showProgress(showProgress),
     m_cache(0),
     m_cacheCentreFrame(0),
@@ -431,6 +430,16 @@
     }
 }
 
+bool
+View::hasLightBackground() const
+{
+    for (LayerList::const_iterator i = m_layers.begin();
+         i != m_layers.end(); ++i) {
+        if (!(*i)->hasLightBackground()) return false;
+    }
+    return true;
+}
+
 View::LayerProgressBar::LayerProgressBar(QWidget *parent) :
     QProgressBar(parent)
 {
@@ -1614,14 +1623,13 @@
 		 "followPan=\"%3\" "
 		 "followZoom=\"%4\" "
 		 "tracking=\"%5\" "
-		 "light=\"%6\" %7>\n")
+		 " %6>\n")
 	.arg(m_centreFrame)
 	.arg(m_zoomLevel)
 	.arg(m_followPan)
 	.arg(m_followZoom)
 	.arg(m_followPlay == PlaybackScrollContinuous ? "scroll" :
 	     m_followPlay == PlaybackScrollPage ? "page" : "ignore")
-	.arg(m_lightBackground)
 	.arg(extraAttributes);
 
     for (size_t i = 0; i < m_layers.size(); ++i) {