-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improvements to hypothesis tab #378
Conversation
Preview page for your plugin is ready here: |
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
==========================================
+ Coverage 85.02% 85.50% +0.47%
==========================================
Files 26 31 +5
Lines 1863 2207 +344
Branches 338 404 +66
==========================================
+ Hits 1584 1887 +303
- Misses 210 236 +26
- Partials 69 84 +15
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think everything is working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's looking good! You can add a callback with the other ones to disable the Optimiser tab when enable optimisation
is unchecked:
btrack_widget.enable_optimisation.toggled.connect(
lambda is_checked: btrack_widget._tabs.setTabEnabled(2, is_checked)
)
Separate PR |
Co-authored-by: Alan R Lowe <[email protected]>
# Disable the Optimiser tab if unchecked | ||
for tab in range(btrack_widget._tabs.count()): | ||
if btrack_widget._tabs.tabText(tab) == "Optimiser": | ||
break | ||
btrack_widget.enable_optimisation.toggled.connect( | ||
lambda is_checked: btrack_widget._tabs.setTabEnabled(tab, is_checked) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the best way I could get it without relying on index @p-j-smith
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paddyroddy I think that's an okay way to do it. Or if you prefer you can get the index of one of the tabs using the widget we put in that tab. As we're not storing the widget itself, you could use one of the child widgets (e.g. hypotheses
) and find its parent:
optimiser_tab_index = btrack_widget._tabs.indexOf(btrack_widget.hypotheses.parentWidget())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that, but I'm not convinced it's any better! Especially as some widgets have moved tabs
Now looks like this. Decided to also shrink the logo and move |
This PR is a catch all for various changes related to the napari plugin and things done in the last few days. I'll make a separate issue to test this.