Skip to content

Commit

Permalink
fix(style_manager): rename idval to category & add label to category …
Browse files Browse the repository at this point in the history
…combo
  • Loading branch information
smaspons committed Sep 4, 2024
1 parent 2eb60ec commit a8e8957
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/toolbars/utilities/style_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _filter_styles(self):
if selected_stylegroup_name:
if filter_str:
filter_str += " AND "
filter_str += f"idval = '{selected_stylegroup_name}'"
filter_str += f"category = '{selected_stylegroup_name}'"

model = self.style_mng_dlg.tbl_style.model()
model.setFilter(filter_str)
Expand All @@ -197,7 +197,7 @@ def _load_styles(self):

if selected_stylegroup_name:
# Apply filter based on the selected style group
model.setFilter(f"idval = '{selected_stylegroup_name}'")
model.setFilter(f"category = '{selected_stylegroup_name}'")
model.select()

# Check for any errors
Expand Down Expand Up @@ -250,7 +250,7 @@ def _check_style_exists(self, dialog_create):

if row_idval:
dialog_create.idval.setStyleSheet(color)
dialog_create.idval.setToolTip("Idval already exists")
dialog_create.idval.setToolTip("Category already exists")
has_error = True
else:
dialog_create.idval.setStyleSheet("")
Expand Down
15 changes: 14 additions & 1 deletion core/ui/toolbars/utilities/style_manager.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<item row="0" column="0">
<widget class="QLabel" name="lbl_filter_name">
<property name="text">
<string>Filter by: Layer name</string>
<string>Filter by: layername</string>
</property>
</widget>
</item>
Expand All @@ -62,6 +62,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
Expand Down Expand Up @@ -168,6 +174,13 @@
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbl_filter_category">
<property name="text">
<string>Filter by: Category</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit a8e8957

Please sign in to comment.