Skip to content

Commit

Permalink
correctly restore the tabular window filter
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Jan 11, 2024
1 parent 49b0bb5 commit 8e223d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/asammdf/gui/widgets/mdi_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -3585,6 +3585,8 @@ def _load_tabular_window(self, window_info):

w.setWindowTitle(generate_window_title(w, window_info["type"], window_info["title"]))

mode = tabular.format_selection.currentText()

filter_count = 0
available_columns = [signals.index.name, *signals.columns]
for filter_info in window_info["configuration"]["filters"]:
Expand All @@ -3597,7 +3599,12 @@ def _load_tabular_window(self, window_info):
filter.relation.setCurrentText(filter_info["relation"])
filter.column.setCurrentText(filter_info["column"])
filter.op.setCurrentText(filter_info["op"])
filter.target.setText(str(filter_info["target"]).strip('"'))
if mode == "phys":
filter.target.setText(str(filter_info["target"]).strip('"'))
elif mode == "hex":
filter.target.setText(hex(filter_info["target"]).strip('"'))
elif mode == "bin":
filter.target.setText(bin(filter_info["target"]).strip('"'))
filter.validate_target()

filter_count += 1
Expand Down

0 comments on commit 8e223d9

Please sign in to comment.