summaryrefslogtreecommitdiffstats
path: root/qt-ui/undocommands.h
AgeCommit message (Collapse)Author
2015-06-14Fix renumbering of divesGravatar Dirk Hohndel
The implementation in commit 182fe790c9e8 ("Add ability to undo renumbering of dives") looks perfectly reasonable, but it depends on an implementation detail: it assumes that the keys of the QMap are returned in the same order in which they were placed there. Which apparently isn't the case for some version of Qt. With this commit we simply remember both the old and the new number for each dive and therefore the order in which they are processed doesn't matter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Add ability to undo removing of dives from tripsGravatar Grace Karanja
Add the functionality to undo/redo removing of dives from trips. The code calling remove_dive_from_trip has moved to the UndoCommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-17Consistent variable names in UndoCommands classGravatar Grace Karanja
Implements a uniform variable naming scheme in the undocommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-28Add ability to undo renumbering of divesGravatar Grace Karanja
Expand the undo feature by storing a list of renumbered dives' ids and numbers so that the original numbers can be restored if needed. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-14Add ability to undo shifting of dive timeGravatar Grace Karanja
Adds the ability to undo shifting of dive times. The change is captured at simplewidgets.cpp and an undo command is created. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add a structure to hold undo commandsGravatar Grace Karanja
Add the undocommands.cpp / undocommands.h files, which will hold a collection of classes that will hold undo commands. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>