Skip to content

Commit

Permalink
fix(column reference): remove manage style from btn_add_layer on nets…
Browse files Browse the repository at this point in the history
…cenario_manager_btn

(cherry picked from commit dd36fb6)
  • Loading branch information
edgarfuste committed Sep 27, 2024
1 parent b230cff commit 2e23664
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/toolbars/plan/netscenario_manager_btn.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _manage_add_layers(self):

# Get layers to add
lyr_filter = "%plan_netscenario_%"
sql = f"SELECT id, alias, style_id, addparam FROM sys_table WHERE id LIKE '{lyr_filter}' AND alias IS NOT NULL"
sql = f"SELECT id, alias, addparam FROM sys_table WHERE id LIKE '{lyr_filter}' AND alias IS NOT NULL"
rows = tools_db.get_rows(sql)
if rows:
# LOAD ALL
Expand All @@ -748,13 +748,10 @@ def _manage_add_layers(self):
main_menu.addAction(widgetAction)

# LAYERS
for tablename, alias, style_id, addparam in rows:
for tablename, alias, addparam in rows:
# Manage alias
if not alias:
alias = tablename.replace('plan_netscenario_', '').replace('_', ' ').capitalize()
# Manage style_id
if not style_id:
style_id = "-1"
# Manage pkey
pk = "id"
if addparam:
Expand All @@ -777,7 +774,7 @@ def _manage_add_layers(self):
widget.setStyleSheet("margin: 5px 5px 5px 8px;")

widgetAction.defaultWidget().stateChanged.connect(
partial(self._check_action_ischecked, tablename, the_geom, pk, style_id, alias.strip()))
partial(self._check_action_ischecked, tablename, the_geom, pk, -1, alias.strip()))

main_menu.exec_(click_point)

Expand Down

0 comments on commit 2e23664

Please sign in to comment.