Skip to content

Commit 9e342d8

Browse files
authored
Merge pull request #2514 from pyrevitlabs/fix/2466
Color Splasher: Unwanted characters in filter name
2 parents dc86688 + 70e38a5 commit 9e342d8

File tree

1 file changed

+2
-1
lines changed
  • extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton

1 file changed

+2
-1
lines changed

extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton/script.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ def Execute(self, uiapp):
361361
ogs.SetCutForegroundPatternId(solid_fill_id)
362362
# Get filters apply to view
363363
filter_name = sel_cat.name + "/" + sel_par.name + " - " + item.value
364-
filter_name = filter_name.strip("{}[]:\\|?/<>*")
364+
# added ':' character and chaged the removal method to translate, ref: issue #2466
365+
filter_name = filter_name.translate({ord(i): None for i in "{}[]:\\|?/<>*"})
365366
if filter_name in dict_filters or filter_name in dict_rules:
366367
if filter_name in dict_rules and filter_name not in dict_filters:
367368
view.AddFilter(dict_rules[filter_name])

0 commit comments

Comments
 (0)