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

Conversation

sstendahl
Copy link
Owner

@sstendahl sstendahl commented Jan 17, 2024

Does not optimise limits for items that are hidden. I found it unintuitive if items are hidden, that these are still taken into account when doing optimise limits. Skipping those items make the following possible:

Skarminspelning.fran.2024-01-17.08-17-17.webm

Which is thus useful if you have a bunch of datasets in the same project with different limits, and just want to toggle between them. When items are not hidden, but non-active, then they are still used when optimising the limits.

Does not optimise limits for items that are hidden.
src/data.py Outdated
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()

@sstendahl sstendahl merged commit 9a0988f into main Jan 17, 2024
6 checks passed
@cmkohnen cmkohnen deleted the Do-not-optimise-limits-for-hidden-items branch January 17, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants