From 825fcc854788750d0d1afc4a6d1cdae9e85e738e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 24 Nov 2018 07:50:13 +0100 Subject: Dive list: add table parameter to autogroup_dives() Currently autogroup_dives() groups all dives in the global dive list. Add a table parameter so that dives in any table can be grouped. Thus it will be possible to pre-group dives on import, which will be used for undo of import. Signed-off-by: Berthold Stoeger --- desktop-widgets/command_divelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp index 7bab098fc..b5cbc12ee 100644 --- a/desktop-widgets/command_divelist.cpp +++ b/desktop-widgets/command_divelist.cpp @@ -724,7 +724,7 @@ AutogroupDives::AutogroupDives() dive_trip *trip; bool alloc; int from, to; - for(int i = 0; (trip = get_dives_to_autogroup(i, &from, &to, &alloc)) != NULL; i = to) { + for(int i = 0; (trip = get_dives_to_autogroup(&dive_table, i, &from, &to, &alloc)) != NULL; i = to) { // If this is an allocated trip, take ownership if (alloc) divesToMove.tripsToAdd.emplace_back(trip); -- cgit v1.2.3-70-g09d2