comparison layer/TimeValueLayer.cpp @ 286:7554ae119882

* Fix failure to save vertical scale setting from time-value layer
author Chris Cannam
date Wed, 11 Jul 2007 20:46:37 +0000
parents 9dd432665059
children cd2492c5fe45
comparison
equal deleted inserted replaced
285:9dd432665059 286:7554ae119882
1422 1422
1423 QString 1423 QString
1424 TimeValueLayer::toXmlString(QString indent, QString extraAttributes) const 1424 TimeValueLayer::toXmlString(QString indent, QString extraAttributes) const
1425 { 1425 {
1426 return Layer::toXmlString(indent, extraAttributes + 1426 return Layer::toXmlString(indent, extraAttributes +
1427 QString(" colour=\"%1\" plotStyle=\"%2\"") 1427 QString(" colour=\"%1\" plotStyle=\"%2\" verticalScale=\"%3\"")
1428 .arg(encodeColour(m_colour)).arg(m_plotStyle)); 1428 .arg(encodeColour(m_colour)).arg(m_plotStyle)
1429 .arg(m_verticalScale));
1429 } 1430 }
1430 1431
1431 void 1432 void
1432 TimeValueLayer::setProperties(const QXmlAttributes &attributes) 1433 TimeValueLayer::setProperties(const QXmlAttributes &attributes)
1433 { 1434 {
1441 1442
1442 bool ok; 1443 bool ok;
1443 PlotStyle style = (PlotStyle) 1444 PlotStyle style = (PlotStyle)
1444 attributes.value("plotStyle").toInt(&ok); 1445 attributes.value("plotStyle").toInt(&ok);
1445 if (ok) setPlotStyle(style); 1446 if (ok) setPlotStyle(style);
1446 } 1447
1447 1448 VerticalScale scale = (VerticalScale)
1449 attributes.value("verticalScale").toInt(&ok);
1450 if (ok) setVerticalScale(scale);
1451 }
1452