diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-02-07 19:59:34 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 8c89f6fe1520d9d88fb81acab995ba803f5c4ac1 (patch) | |
tree | fb081e05e0832e91591696187c8fa148464da4c0 /desktop-widgets/tab-widgets/maintab.h | |
parent | 1c854d580ae21d6647bcdd5d6db3e57cda9b5f3c (diff) | |
download | subsurface-8c89f6fe1520d9d88fb81acab995ba803f5c4ac1.tar.gz |
Undo: implement undo of tag editing
The code follows the other edit-commands, but uses its own base
class, because it is distinctly different. Editing the tag field
does not simply mean setting the tag for all dives, but rather
adding and removing individual tags.
This class will be reused for editing of dive buddies and masters.
Modify the tag widget thus that it sends an editingFinished()
signal when it goes out of focus. The editingFinished() signal
was prevented by hooking into the return, enter and tab key-events.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.h')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index 4bff215ce..3b9fa26d6 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -89,7 +89,7 @@ slots: void on_timeEdit_timeChanged(const QTime & time); void on_rating_valueChanged(int value); void on_visibility_valueChanged(int value); - void on_tagWidget_textChanged(); + void on_tagWidget_editingFinished(); void editCylinderWidget(const QModelIndex &index); void editWeightWidget(const QModelIndex &index); void addDiveStarted(); @@ -119,7 +119,6 @@ private: int lastTabSelectedDiveTrip; void resetPallete(); void copyTagsToDisplayedDive(); - void saveTags(const QVector<dive *> &selectedDives); void saveTaggedStrings(const QVector<dive *> &selectedDives); int diffTaggedStrings(QString currentString, QString displayedString, QStringList &addedList, QStringList &removedList); void markChangedWidget(QWidget *w); |