Mercurial > hg > svgui
comparison layer/Layer.cpp @ 1315:1d7921b1852f
Ensure scale appears for layer when drawn in AutoAlign mode without any other layer present to align to
author | Chris Cannam |
---|---|
date | Wed, 04 Jul 2018 15:34:16 +0100 |
parents | a34a2a25907c |
children | c8a6fd3f9dff |
comparison
equal
deleted
inserted
replaced
1314:769d7890203b | 1315:1d7921b1852f |
---|---|
586 } | 586 } |
587 | 587 |
588 v->drawMeasurementRect(paint, this, r.pixrect.normalized(), focus); | 588 v->drawMeasurementRect(paint, this, r.pixrect.normalized(), focus); |
589 } | 589 } |
590 | 590 |
591 bool | |
592 Layer::valueExtentsMatchMine(LayerGeometryProvider *v) const | |
593 { | |
594 double min, min_; | |
595 double max, max_; | |
596 bool logarithmic, logarithmic_; | |
597 QString unit; | |
598 | |
599 if (!getValueExtents(min_, max_, logarithmic_, unit)) { | |
600 return false; | |
601 } | |
602 | |
603 if (!v->getValueExtents(unit, min, max, logarithmic)) { | |
604 return false; | |
605 } | |
606 | |
607 if (min != min_ || | |
608 max != max_ || | |
609 logarithmic != logarithmic_) { | |
610 return false; | |
611 } | |
612 | |
613 return true; | |
614 } | |
615 | |
591 void | 616 void |
592 Layer::toXml(QTextStream &stream, | 617 Layer::toXml(QTextStream &stream, |
593 QString indent, QString extraAttributes) const | 618 QString indent, QString extraAttributes) const |
594 { | 619 { |
595 stream << indent; | 620 stream << indent; |