changeset 598:3803f6dcf361 sv_v1.9

Save/restore more slice layer parameters (fixing SF feature #3039297)
author Chris Cannam
date Wed, 28 Sep 2011 13:55:52 +0100
parents 2f087d950621
children 485b12e3505e
files layer/SliceLayer.cpp
diffstat 1 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/layer/SliceLayer.cpp	Wed Sep 28 13:38:39 2011 +0100
+++ b/layer/SliceLayer.cpp	Wed Sep 28 13:55:52 2011 +0100
@@ -885,12 +885,18 @@
     s += QString("colourScheme=\"%1\" "
 		 "energyScale=\"%2\" "
                  "samplingMode=\"%3\" "
-                 "gain=\"%4\" "
-                 "normalize=\"%5\"")
+                 "plotStyle=\"%4\" "
+                 "binScale=\"%5\" "
+                 "gain=\"%6\" "
+                 "threshold=\"%7\" "
+                 "normalize=\"%8\"")
         .arg(m_colourMap)
 	.arg(m_energyScale)
         .arg(m_samplingMode)
+        .arg(m_plotStyle)
+        .arg(m_binScale)
         .arg(m_gain)
+        .arg(m_threshold)
         .arg(m_normalize ? "true" : "false");
 
     SingleColourLayer::toXml(stream, indent, extraAttributes + " " + s);
@@ -914,9 +920,20 @@
     int colourMap = attributes.value("colourScheme").toInt(&ok);
     if (ok) setFillColourMap(colourMap);
 
+    PlotStyle s = (PlotStyle)
+	attributes.value("plotStyle").toInt(&ok);
+    if (ok) setPlotStyle(s);
+
+    BinScale b = (BinScale)
+	attributes.value("binScale").toInt(&ok);
+    if (ok) setBinScale(b);
+
     float gain = attributes.value("gain").toFloat(&ok);
     if (ok) setGain(gain);
 
+    float threshold = attributes.value("threshold").toFloat(&ok);
+    if (ok) setThreshold(threshold);
+
     bool normalize = (attributes.value("normalize").trimmed() == "true");
     setNormalize(normalize);
 }