mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix refresh metric losing ride selection
When metrics are refreshed the ride navigator re-reads the metric DB and loses the currently selected ride. This patch causes the ride to be re-selected once the refresh completes.
This commit is contained in:
@@ -150,6 +150,7 @@ RideNavigator::RideNavigator(MainWindow *parent) : main(parent), active(false),
|
||||
|
||||
// refresh when database is updated
|
||||
connect(main->metricDB, SIGNAL(dataChanged()), this, SLOT(refresh()));
|
||||
|
||||
// refresh when config changes (metric/imperial?)
|
||||
connect(main, SIGNAL(configChanged()), this, SLOT(refresh()));
|
||||
// refresh when rides added/removed
|
||||
@@ -187,6 +188,9 @@ RideNavigator::refresh()
|
||||
sqlModel->select();
|
||||
while (sqlModel->canFetchMore(QModelIndex()))
|
||||
sqlModel->fetchMore(QModelIndex());
|
||||
|
||||
active=false;
|
||||
rideTreeSelectionChanged();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user