diff --git a/oscar/overview.cpp b/oscar/overview.cpp index 39ea54cb..58d195fc 100644 --- a/oscar/overview.cpp +++ b/oscar/overview.cpp @@ -24,6 +24,11 @@ #endif +// Features enabled by conditional compilation. + + + + #include #include #include @@ -591,6 +596,9 @@ void Overview::on_XBoundsChanged(qint64 start,qint64 end) chartsEmpty.clear(); updateGraphCombo(); } + + + } void Overview::dateStart_currentPageChanged(int year, int month) @@ -643,7 +651,7 @@ void Overview::on_dateStart_dateChanged(const QDate &date) void Overview::on_zoomButton_clicked() { // the Current behaviour is to zoom back to the last range created by on_rangeCombo_activation - // so do just that + // This change preserves OSCAR behaviour on_rangeCombo_activated(p_profile->general->lastOverviewRange()); // type of range in last use } @@ -703,13 +711,6 @@ void Overview::on_rangeCombo_activated(int index) p_profile->general->setCustomOverviewRangeEnd(end); index=8; ui->rangeCombo->setCurrentIndex(index); - } else if (customMode) { // last mode was custom. - // Reset Custom Range to current range in calendar widget - // Custom mode MUST be initialized to false when the Custom Instance is created. - start = uiStartDate; - end = uiEndDate; - p_profile->general->setCustomOverviewRangeStart(start); - p_profile->general->setCustomOverviewRangeEnd(end); } else { // have a change in RangeCombo selection. Use last saved values. start = p_profile->general->customOverviewRangeStart() ; @@ -720,12 +721,15 @@ void Overview::on_rangeCombo_activated(int index) if (start < p_profile->FirstDay()) { start = p_profile->FirstDay(); } customMode = (index == 8) ; + + ui->dateStartLabel->setEnabled(customMode); ui->dateEndLabel->setEnabled(customMode); ui->dateEnd->setEnabled(customMode); ui->dateStart->setEnabled(customMode); + p_profile->general->setLastOverviewRange(index); // type of range in last use // Ensure that all summary files are available and update version numbers if required @@ -749,9 +753,6 @@ void Overview::on_rangeCombo_activated(int index) progress->close(); delete progress; - // first and last dates for ANY machine type - //uiStartDate=start; - //uiEndDate=end; setRange(start, end); }