Skip to content

Commit

Permalink
Merge pull request #850 from Giswater/dev-3.5
Browse files Browse the repository at this point in the history
Dev 3.5
  • Loading branch information
edgarfuste authored Jan 21, 2022
2 parents 25705cb + c99eda2 commit 868b0e8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
20 changes: 12 additions & 8 deletions core/admin/admin_btn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
11 changes: 8 additions & 3 deletions core/shared/psector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion core/toolbars/toc/add_child_layer_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit 868b0e8

Please sign in to comment.