From d169720195826ab13ef48afa8edaf6ef0c445480 Mon Sep 17 00:00:00 2001 From: Edgar Fuste Date: Thu, 20 Jan 2022 16:15:30 +0100 Subject: [PATCH 1/5] Update metadata verion --- metadata.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.txt b/metadata.txt index 904ba6ea3..750ba65e3 100644 --- a/metadata.txt +++ b/metadata.txt @@ -4,7 +4,7 @@ qgisMinimumVersion=3.10 qgisMaximumVersion=3.99 description=Plugin to manage water networks (water supply, sewerage and urban drainage) using QGIS and PostGIS-PostgreSQL(from 9.5 to 11.x) about=Disclaimer: This plugin is released using the open source GNU-GPL3 license. Although a reasonable effort has been made to assure that the results obtained are correct, some of the capabilities provided by Giswater are experimental, therefore the development team and the Giswater Association are not responsible and assume no liability whatsoever for any results or any use made of the results obtained from the program, nor for any damages or litigation that result from the use of these programs for any purpose. -version=3.5.020 +version=3.5.021 author=David Erill, Luigi Pirelli, Natasa Cica, Nestor Ibañez, Barbara Rzepka, Sergi Muñoz, Josep Lluís Sala, Edgar Fusté, Albert Bofill, Sergi Maspons, Elies Bertran, Abel García Juanes, Xavier Torret From 442c92e7490e8d1f1d73d61e2570fc2b813d7f97 Mon Sep 17 00:00:00 2001 From: Edgar Fuste Date: Thu, 20 Jan 2022 16:41:29 +0100 Subject: [PATCH 2/5] Bug fix: manage errors on update schema database --- core/admin/admin_btn.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/core/admin/admin_btn.py b/core/admin/admin_btn.py index 729cd81da..1491a87ff 100644 --- a/core/admin/admin_btn.py +++ b/core/admin/admin_btn.py @@ -543,21 +543,25 @@ def update_31to39(self, new_project=False, project_type=False, no_ct=False): if new_project: if self.dev_commit is True: if str(sub_folder) > '31100': - self.update_minor31to39(folder_update, new_project, project_type, no_ct) - + status = self.update_minor31to39(folder_update, new_project, project_type, no_ct) + if status is False: + return False else: if str(sub_folder) > '31100' and str(sub_folder) <= str(self.plugin_version).replace('.', ''): - self.update_minor31to39(folder_update, new_project, project_type, no_ct) - + status = self.update_minor31to39(folder_update, new_project, project_type, no_ct) + if status is False: + return False else: if self.dev_commit is True: if str(sub_folder) > str(self.project_version).replace('.', '') and str(sub_folder) > '31100': - self.update_minor31to39(folder_update, new_project, project_type, no_ct) - + status = self.update_minor31to39(folder_update, new_project, project_type, no_ct) + if status is False: + return False else: if str(sub_folder) > str(self.project_version).replace('.', '') and str(sub_folder) > '31100' and str(sub_folder) <= str(self.plugin_version).replace('.', ''): - self.update_minor31to39(folder_update, new_project, project_type, no_ct) - + status = self.update_minor31to39(folder_update, new_project, project_type, no_ct) + if status is False: + return False return True From 703a7af0afe2ccdcc4a7689ce783733dcad492da Mon Sep 17 00:00:00 2001 From: Edgar Fuste Date: Fri, 21 Jan 2022 09:25:15 +0100 Subject: [PATCH 3/5] Minor bug fix: manage layer style on load all chek --- core/toolbars/toc/add_child_layer_button.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/toolbars/toc/add_child_layer_button.py b/core/toolbars/toc/add_child_layer_button.py index 5247868db..88e77e965 100644 --- a/core/toolbars/toc/add_child_layer_button.py +++ b/core/toolbars/toc/add_child_layer_button.py @@ -119,7 +119,7 @@ def _manage_load_all(self, fields, group, sub_group, sub_sub_group=None): else: the_geom = field['geomField'] geom_field = field['tableId'] - style_id = None + style_id = field['style_id'] group = context['level_1'] sub_group = context['level_2'] From 764b2f5d8b4b3a3af4f29cd4ad620a212108cf04 Mon Sep 17 00:00:00 2001 From: Edgar Fuste Date: Fri, 21 Jan 2022 13:19:44 +0100 Subject: [PATCH 4/5] Bug fix: Manage signals on tab other_price from psector form --- core/shared/psector.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/shared/psector.py b/core/shared/psector.py index b67d44a83..c520fadcd 100644 --- a/core/shared/psector.py +++ b/core/shared/psector.py @@ -133,8 +133,11 @@ def get_psector(self, psector_id=None, is_api=False): num_value.setValidator(QIntValidator()) where = " WHERE typevalue = 'psector_type' " self.populate_combos(self.dlg_plan_psector.psector_type, 'idval', 'id', 'plan_typevalue', where) + + # Manage other_price tab variables self.price_loaded = False self.header_exist = None + self.load_signals = False # Populate combo status sql = "SELECT id, idval FROM plan_typevalue WHERE typevalue = 'value_priority'" @@ -854,8 +857,8 @@ def check_tab_position(self): if self.dlg_plan_psector.tabWidget.currentIndex() == 3: tableleft = "v_price_compost" tableright = f"v_edit_plan_psector_x_other" - field_id_right = "price_id" - self.price_selector(self.dlg_plan_psector, tableleft, tableright, field_id_right) + if not self.load_signals: + self.price_selector(self.dlg_plan_psector, tableleft, tableright) elif self.dlg_plan_psector.tabWidget.currentIndex() == 4: self.populate_budget(self.dlg_plan_psector, psector_id) elif self.dlg_plan_psector.tabWidget.currentIndex() == 5: @@ -1079,8 +1082,10 @@ def set_plan(self): return json_result - def price_selector(self, dialog, tableleft, tableright, field_id_right): + def price_selector(self, dialog, tableleft, tableright): + + self.load_signals = True # fill QTableView all_rows tbl_all_rows = dialog.findChild(QTableView, "all_rows") From c99eda203655d211b54bd6da4188f6079a25887d Mon Sep 17 00:00:00 2001 From: Edgar Fuste Date: Fri, 21 Jan 2022 13:39:49 +0100 Subject: [PATCH 5/5] Update dbmodel --- dbmodel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbmodel b/dbmodel index a48b16af7..51873e8c0 160000 --- a/dbmodel +++ b/dbmodel @@ -1 +1 @@ -Subproject commit a48b16af72b948c4fabd7e80447d08078b944e59 +Subproject commit 51873e8c045cb25846b7be097dd1a069e60b370b