undo: reorder cylinders on remove-cylinder undo/redo

The cylinders in the events must be reordered if we remove
a cylinder. To avoid duplication of code, move the reordering
function into qthelper.cpp, though it might not be ideal
there.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-02-23 19:24:06 +01:00
parent a37939889b
commit 5b7a316593
4 changed files with 39 additions and 9 deletions

View file

@ -83,6 +83,8 @@ QLocale getLocale();
QVector<QPair<QString, int>> selectedDivesGasUsed();
QString getUserAgent();
QString printGPSCoords(const location_t *loc);
std::vector<int> get_cylinder_map_for_remove(int count, int n);
std::vector<int> get_cylinder_map_for_add(int count, int n);
extern QString (*changesCallback)();
void uiNotification(const QString &msg);