UI Nits: LTM add chart use a default date range

When adding a chart to the home view no date range is set.
This update ensures that the last selected date range is
used, so when a chart is selected/configured some data
will be shown.
This commit is contained in:
Mark Liversedge
2012-12-02 18:10:26 +00:00
parent 5193deaf61
commit cf8d3b4bd8
4 changed files with 11 additions and 1 deletions

View File

@@ -1272,7 +1272,8 @@ GcWindowDialog::GcWindowDialog(GcWinID type, MainWindow *mainWindow) : mainWindo
RideItem *notconst = (RideItem*)mainWindow->currentRideItem();
win->setProperty("ride", QVariant::fromValue<RideItem*>(notconst));
win->setProperty("dateRange", property("dateRange"));
DateRange dr = mainWindow->currentDateRange();
win->setProperty("dateRange", QVariant::fromValue<DateRange>(dr));
layout->setStretch(0, 100);
layout->setStretch(1, 50);