diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index 7fb9d14e6..9adb18ee1 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -1356,11 +1356,20 @@ AllPlotWindow::setAllPlotWidgets(RideItem *ride) scrollRight->show(); } else { fullPlot->hide(); - controlsLayout->setRowStretch(0, 100); - controlsLayout->setRowStretch(1, 00); - spanSlider->hide(); - scrollLeft->hide(); - scrollRight->hide(); + + if (isCompare()) { + controlsLayout->setRowStretch(0, 100); + controlsLayout->setRowStretch(1, 00); + spanSlider->show(); + scrollLeft->show(); + scrollRight->show(); + } else { + controlsLayout->setRowStretch(0, 100); + controlsLayout->setRowStretch(1, 00); + spanSlider->hide(); + scrollLeft->hide(); + scrollRight->hide(); + } } } } @@ -1978,9 +1987,12 @@ AllPlotWindow::setShowFull(int value) } else { fullPlot->hide(); - spanSlider->hide(); - scrollLeft->hide(); - scrollRight->hide(); + + if (!isCompare()) { + spanSlider->hide(); + scrollLeft->hide(); + scrollRight->hide(); + } allPlotLayout->setStretch(1,0); } } diff --git a/src/ComparePane.cpp b/src/ComparePane.cpp index ae0df1517..25f3696bb 100644 --- a/src/ComparePane.cpp +++ b/src/ComparePane.cpp @@ -500,6 +500,37 @@ ComparePane::itemsWereSorted() } } +void +ComparePane::clear() +{ + if (mode_ == interval) { // INTERVALS + + // wipe all away + foreach(CompareInterval ci, context->compareIntervals) { + delete ci.data; + } + context->compareIntervals.clear(); + + // refresh table + refreshTable(); + + // tell the charts + context->notifyCompareIntervalsChanged(); + + } else { + + // wipe em + context->compareDateRanges.clear(); + + // refresh table + refreshTable(); + + // tell the charts + context->notifyCompareDateRangesChanged(); + + } +} + void ComparePane::intervalButtonsChanged() { diff --git a/src/ComparePane.h b/src/ComparePane.h index 0a46b053a..b6b6e458e 100644 --- a/src/ComparePane.h +++ b/src/ComparePane.h @@ -48,6 +48,9 @@ class ComparePane : public QWidget signals: public slots: + + void clear(); // wipe away whatever is there + void configChanged(); void itemsWereSorted();