diff --git a/src/HomeWindow.cpp b/src/HomeWindow.cpp index 6ac243c6b..0ad897ce1 100644 --- a/src/HomeWindow.cpp +++ b/src/HomeWindow.cpp @@ -1272,7 +1272,8 @@ GcWindowDialog::GcWindowDialog(GcWinID type, MainWindow *mainWindow) : mainWindo RideItem *notconst = (RideItem*)mainWindow->currentRideItem(); win->setProperty("ride", QVariant::fromValue(notconst)); - win->setProperty("dateRange", property("dateRange")); + DateRange dr = mainWindow->currentDateRange(); + win->setProperty("dateRange", QVariant::fromValue(dr)); layout->setStretch(0, 100); layout->setStretch(1, 50); diff --git a/src/LTMSidebar.cpp b/src/LTMSidebar.cpp index 51fcd30f3..78858528f 100644 --- a/src/LTMSidebar.cpp +++ b/src/LTMSidebar.cpp @@ -128,6 +128,10 @@ LTMSidebar::LTMSidebar(MainWindow *parent, const QDir &home) : QWidget(parent), connect(seasons, SIGNAL(seasonsChanged()), this, SLOT(resetSeasons())); connect(this, SIGNAL(dateRangeChanged(DateRange)), this, SLOT(setSummary(DateRange))); + + // let everyone know what date range we are starting with + dateRangeTreeWidgetSelectionChanged(); + } void diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index e3c28824d..adf47b8bf 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1128,6 +1128,7 @@ MainWindow::dateRangeChangedDiary(DateRange dr) // when we have multiple sidebars that change date we need to connect // them up individually.... i.e. LTM.... diaryWindow->setProperty("dateRange", QVariant::fromValue(dr)); + _dr = dr; } void @@ -1137,6 +1138,7 @@ MainWindow::dateRangeChangedLTM(DateRange dr) // when we have multiple sidebars that change date we need to connect // them up individually.... i.e. LTM.... homeWindow->setProperty("dateRange", QVariant::fromValue(dr)); + _dr = dr; } void diff --git a/src/MainWindow.h b/src/MainWindow.h index c64ab7e06..dc390ab7f 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -32,6 +32,7 @@ #include "QuarqdClient.h" #include "RealtimeData.h" #include "SpecialFields.h" +#include "TimeUtils.h" #include #ifdef Q_OS_MAC @@ -126,6 +127,7 @@ class MainWindow : public QMainWindow RideItem *rideItem() const { return ride; } const RideFile *currentRide(); const RideItem *currentRideItem() { return ride; } + DateRange currentDateRange() { return _dr; } void updateRideFileIntervals(); RideMetadata *rideMetadata() { return _rideMetadata; } @@ -347,6 +349,7 @@ class MainWindow : public QMainWindow IntervalItem *activeInterval; // currently active for context menu popup RideItem *activeRide; // currently active for context menu popup RideItem *ride; // the currently selected ride + DateRange _dr; // the currently selected date range ErgFile *workout; // the currently selected workout file long now;