diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-27 21:49:19 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 63414fc82394031a9ce9c25d635430107fde19e0 (patch) | |
tree | f785302452d549c391fde14d22464625d6007494 /desktop-widgets/tab-widgets/TabDiveEquipment.cpp | |
parent | 2eeb5f4fc2d6da8a8c8950f0b479b7cb2055af07 (diff) | |
download | subsurface-63414fc82394031a9ce9c25d635430107fde19e0.tar.gz |
undo: show multiple dive warning when editing equipment
When editing cylinders or weights directly in the table widgets,
no warning was shown if multiple dives were affected. To solve this,
emit signals from the respective models and catch them in dive
equipment tab. Not very nice, but it works for now.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveEquipment.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveEquipment.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp index 13cfe77c4..78973b6c1 100644 --- a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp +++ b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp @@ -35,6 +35,8 @@ TabDiveEquipment::TabDiveEquipment(QWidget *parent) : TabBase(parent), connect(&diveListNotifier, &DiveListNotifier::divesChanged, this, &TabDiveEquipment::divesChanged); connect(ui.cylinders, &TableView::itemClicked, this, &TabDiveEquipment::editCylinderWidget); connect(ui.weights, &TableView::itemClicked, this, &TabDiveEquipment::editWeightWidget); + connect(cylindersModel->model(), &CylindersModel::divesEdited, this, &TabDiveEquipment::divesEdited); + connect(weightModel, &WeightModel::divesEdited, this, &TabDiveEquipment::divesEdited); // Current display of things on Gnome3 looks like shit, so // let's fix that. |