diff layer/SpectrogramLayer.cpp @ 1112:d578b685d912 spectrogram-minor-refactor

Colourmap rotation (inelegantly)
author Chris Cannam
date Tue, 19 Jul 2016 10:12:30 +0100
parents 8abdefce36a6
children 261a00010918
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp	Tue Jul 19 09:36:21 2016 +0100
+++ b/layer/SpectrogramLayer.cpp	Tue Jul 19 10:12:30 2016 +0100
@@ -845,8 +845,6 @@
 void
 SpectrogramLayer::setColourRotation(int r)
 {
-    invalidateRenderers();
-
     if (r < 0) r = 0;
     if (r > 256) r = 256;
     int distance = r - m_colourRotation;
@@ -856,6 +854,8 @@
 	m_colourRotation = r;
     }
     
+    invalidateRenderers(); //!!! in theory we shouldn't have to do this... but...
+    
     emit layerParametersChanged();
 }
 
@@ -1481,6 +1481,7 @@
         params.binScale = m_binScale;
         params.alwaysOpaque = true;
         params.invertVertical = false;
+        params.colourRotation = m_colourRotation;
 
         Preferences::SpectrogramSmoothing smoothing = 
             Preferences::getInstance()->getSpectrogramSmoothing();