mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix a couple of problems with dive merging
- Dive list no longer has messed up trip entries - Dive list is now correctly marked as modified after trips are merged - When data file is closed, the list of selected trips is cleared which avoids a potential crash when loading a new data file Fixes #286 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
962abba1f7
commit
7a6ff7a53c
2 changed files with 5 additions and 0 deletions
|
@ -437,7 +437,11 @@ void DiveListView::merge_trip(const QModelIndex &a, int offset)
|
|||
trip_a->notes = strdup(trip_b->notes);
|
||||
while (trip_b->dives)
|
||||
add_dive_to_trip(trip_b->dives, trip_a);
|
||||
rememberSelection();
|
||||
reload(currentLayout, false);
|
||||
fixMessyQtModelBehaviour();
|
||||
restoreSelection();
|
||||
mark_divelist_changed(TRUE);
|
||||
}
|
||||
|
||||
void DiveListView::mergeTripAbove()
|
||||
|
|
|
@ -145,6 +145,7 @@ void MainWindow::on_actionClose_triggered()
|
|||
while (dive_table.nr)
|
||||
delete_single_dive(0);
|
||||
|
||||
dive_list()->selectedTrips.clear();
|
||||
/* clear the selection and the statistics */
|
||||
selected_dive = -1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue