Merge pull request #1078 from Joern-R/pull2

AllPlot - Alt/Slope - sync. setting when switching between views
This commit is contained in:
Mark Liversedge
2014-09-30 19:03:48 +02:00

View File

@@ -819,8 +819,6 @@ AllPlotWindow::compareChanged()
spanSlider->setLowerValue(spanSlider->minimum());
spanSlider->setUpperValue(spanSlider->maximum());
// don't show alt/slope
fullPlot->standard->altSlopeCurve->setVisible(false);
// redraw for red/no-red title
fullPlot->replot();
@@ -1080,9 +1078,6 @@ AllPlotWindow::redrawFullPlot()
static_cast<QwtPlotCanvas*>(fullPlot->canvas())->setBorderRadius(0);
fullPlot->standard->grid->enableY(false);
//don't show the ALT/SLOPE plot here
fullPlot->standard->altSlopeCurve->setVisible(false);
// use the ride to decide
if (fullPlot->bydist)
fullPlot->setAxisScale(QwtPlot::xBottom,
@@ -2262,7 +2257,12 @@ AllPlotWindow::setShowAltSlope(int value)
// compare mode selfcontained update
if (isCompare()) {
// transfer changes of setting here (which is more than on/off) also to other plot settings
fullPlot->showAltSlopeState = value;
fullPlot->setAltSlopePlotStyle(fullPlot->standard->altSlopeCurve);
allPlot->showAltSlopeState = value;
allPlot->setAltSlopePlotStyle(allPlot->standard->altSlopeCurve);
compareChanged();
active = false;
return;