Skip to content

Conversation

knguyen1
Copy link
Contributor

Summary

  • This is a…

    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

    • Keep the Profiles menu open during multiple toggles by using QWidgetAction + QCheckBox, and add _set_profile_enabled to update state and UI deterministically.

Problem

  • The Profiles submenu auto-closes after each toggle, forcing repeated navigation for multi-step profile changes. See PICARD-3114 (link).

Solution

  • Build the Profiles submenu with QWidgetAction + QCheckBox so toggling does not close the menu.
  • Add MainWindow._set_profile_enabled(profile_id: str, enabled: bool) to set state and call _reset_option_menu_state() to refresh dependent UI.
  • Preserve non-exclusive multi-profile toggling behavior.

Action

Additional actions required:

  • Update Picard documentation (please include a reference to this PR)
  • Other (please specify below)

- Replaced QAction with QWidgetAction containing QCheckBox for profile selection, allowing toggling without closing the menu.
- Added a new method to set the enabled state of profiles and refresh the UI accordingly, improving user interaction and experience.
zas
zas previously approved these changes Oct 11, 2025
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM, nice improvement

- Deleted the _update_profile_selection method, which toggled the enabled state of profiles, as it is no longer needed following recent enhancements to the profile selection menu.
- This cleanup improves code maintainability and reduces complexity in the MainWindow class.
@zas zas requested a review from phw October 13, 2025 07:26
@zas zas merged commit 9390e56 into metabrainz:master Oct 15, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants