diff options
-rw-r--r-- | core/divelist.c | 5 | ||||
-rw-r--r-- | qt-models/divetripmodel.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/divelist.c b/core/divelist.c index 379e33eea..a1420e407 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -824,6 +824,9 @@ void process_loaded_dives() /* Inform frontend of reset data. This should reset all the models. */ emit_reset_signal(); + + /* Now that everything is settled, select the newest dive. */ + select_newest_visible_dive(); } /* @@ -1373,7 +1376,7 @@ int get_dive_id_closest_to(timestamp_t when) void clear_dive_file_data() { fulltext_unregister_all(); - clear_selection(); + select_single_dive(NULL); // This is propagate up to the UI and clears all the information. while (dive_table.nr) delete_single_dive(0); diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 71430a7d3..939569522 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -499,7 +499,6 @@ void DiveTripModelBase::reset() uiNotification(tr("finish populating data store")); endResetModel(); uiNotification(tr("setting up internal data structures")); - initSelection(); emit diveListNotifier.numShownChanged(); uiNotification(tr("done setting up internal data structures")); } |