Skip to content

Commit

Permalink
store/restore hidden plot selection items states in the dspf files
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Sep 11, 2024
1 parent 9ed291b commit 9eac948
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/asammdf/gui/widgets/mdi_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -3899,6 +3899,13 @@ def _load_plot_window(self, window_info):
for i, visible in enumerate(window_info["configuration"]["channels_header_columns_visible"]):
plot.channel_selection.setColumnHidden(i, not visible)

hide_missing = window_info["configuration"].get("hide_missing_channels", False)
hide_disabled = window_info["configuration"].get("hide_disabled_channels", False)
if hide_missing or hide_disabled:
plot.channel_selection.hide_missing_channels = hide_missing
plot.channel_selection.hide_disabled_channels = hide_disabled
plot.channel_selection.update_hidden_states()

plot.set_locked(locked=window_info["configuration"].get("locked", False))
plot.hide_axes(hide=window_info["configuration"].get("hide_axes", False))
plot.hide_selected_channel_value(
Expand Down
2 changes: 2 additions & 0 deletions src/asammdf/gui/widgets/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,8 @@ def item_to_config(tree, root):
"focused_mode": not self.focused_mode_btn.isFlat(),
"delta_mode": "value" if self.delta_btn.isFlat() else "delta",
"hide_bookmarks": self.bookmark_btn.isFlat(),
"hide_missing_channels": self.channel_selection.hide_missing_channels,
"hide_disabled_channels": self.channel_selection.hide_disabled_channels,
}

return config
Expand Down

0 comments on commit 9eac948

Please sign in to comment.