Skip to content

Commit

Permalink
gui: fix wildcard filter when multiple files loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
eneelo committed Dec 7, 2023
1 parent 14d034f commit f72fa2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qats/app/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,10 @@ def model_view_filter_changed(self):
# construct regexp string that may be used to initiate QRegularExpression instance
if filter_type == "wildcard":
# pad with wildcard ('*') to get expected behaviour
reg_exp_pattern = QRegularExpression.wildcardToRegularExpression(f"*{pattern}*")
reg_exp_pattern = QRegularExpression.wildcardToRegularExpression(
f"*{pattern}*",
options=QRegularExpression.WildcardConversionOption.NonPathWildcardConversion
)
elif filter_type == "regexp":
# pattern string should be interpreted as a regexp pattern
reg_exp_pattern = pattern
Expand Down Expand Up @@ -1397,7 +1400,6 @@ def update_model(self, newdb):
# fill item model with time series by unique id (common path is removed)
names = self.db.list(names="*", relative=True, display=False)
self.db_source_model.clear() # clear before re-adding
# quickfix for Wildcard issue (#119): replace '\' by '/'
for name in names:
# set each item as unchecked initially
item = QStandardItem(name)
Expand Down

0 comments on commit f72fa2b

Please sign in to comment.