# HG changeset patch # User Chris Cannam # Date 1317214552 -3600 # Node ID 3803f6dcf361c9ec82badb20e3ca9f5c712c5d2f # Parent 2f087d950621c73d58aec99c8d0bcae397046445 Save/restore more slice layer parameters (fixing SF feature #3039297) diff -r 2f087d950621 -r 3803f6dcf361 layer/SliceLayer.cpp --- 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); }