From 7507c96dcdae77fadaacdd10d671816797b5be44 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 3 Jun 2015 22:44:16 -0300 Subject: [PATCH] Do not trigger a dive site change when setting a dive When setting a dive, we fire the dive site change a few times after the index of the QComboBox is changed; we don't need that - fire just once. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 16e424c21..bd893e2da 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -467,6 +467,7 @@ void MainTab::updateDiveInfo(bool clear) process_selected_dives(); process_all_dives(&displayed_dive, &prevd); + ui.location->blockSignals(true); divePictureModel->updateDivePictures(); @@ -708,6 +709,9 @@ void MainTab::updateDiveInfo(bool clear) ui.cylinders->view()->showColumn(CylindersModel::USE); else ui.cylinders->view()->hideColumn(CylindersModel::USE); + + ui.location->blockSignals(false); + emit diveSiteChanged(); } void MainTab::addCylinder_clicked()