summaryrefslogtreecommitdiffstats
path: root/core/selection.cpp
AgeCommit message (Collapse)Author
2020-03-12cleanup: remove current_dive parameter from divesSelected signalGravatar Berthold Stoeger
The diveListNotifier.divesSelected() signal is used to inform the models of a selection change. It sent the current dive as a second parameter. This is redundant, because the only sender of the signal sets current_dive just before sending the signal. Remove the parameter, which appears to be an artifact. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-04Cleanup: lower-case filenames in core/subsurface-qt/Gravatar Berthold Stoeger
We tend to use lower-case filenames. Let's do it for these files as well. Simple search & replace. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-07Selection: provide convenience function for single-dive selectionGravatar Berthold Stoeger
Currently, selecting a single dive or deselecting all dives was quite awkward: One had to pass in a single-dive vector and the dive itself (as current dive). Provide a convenience function that selects a single dive or deselects all dives if null is passed in. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-04Selection: move selection of "first" dive to coreGravatar Berthold Stoeger
The DiveListView has a function to select the first dive. Move this to the core to be able to call it from all parts (not only desktop) of the code. Currently, this has a (small?) UI regression: when filtering dives and no selected dive is visible anymore, the old code would select the first dive in the list. The new code selects the newest dive, which might not be the first if some sort-criterion is active. To revert to the old behavior, it will be necessary to move the sorting function likewise to the core. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-04Selection: move selection functions from divelist.c to selection.cGravatar Berthold Stoeger
Since we now have a selection.c translation unit, put the selection- related functions there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-04Selection: move commands/command_private.* to core/selection.*Gravatar Berthold Stoeger
The file command_private.cpp had functions concerning selections only. To make these functions accessible from outside the undo machinery, turn it into a part of the core-library. Currently, only C++ functions are exported. We might think about also exporting a C interface. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>