Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not optimise limits for hidden items #734

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ def optimize_limits(self) -> None:
for direction in ("bottom", "left", "top", "right")
]
for item_ in self:
if not isinstance(item_, item.DataItem):
if not isinstance(item_, item.DataItem) or (
not item_.get_selected()
and figure_settings.get_property("hide-unselected")):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use the direct call of get_hide_unselected()

continue
for index in \
item_.get_xposition() * 2, 1 + item_.get_yposition() * 2:
Expand Down