-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
WTrackMenu: show 'Update ReplayGain' only in decks' menus #4719
Conversation
0b114b9
to
a3286f1
Compare
src/widget/wtrackmenu.cpp
Outdated
// This action is only usable when m_deckGroup is set. That is true only | ||
// for WTrackmenu instantiated by WTrackProperty and other deck widgets, thus | ||
// don't create it if a track model is set. | ||
if (!m_pTrackModel && featureIsEnabled(Feature::UpdateReplayGain)) { |
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.
How about renaming the enum also to "UpdateReplayGainFromDeckGain"? I was unital confused why a deck is required for updating the replay gain form metadata.
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.
Sure, if it helps avoiding confusion.
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.
The respective slot is slotUpdateReplayGainFromPregain
so I'd adopt that for the enum.
Is this more clear?
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.
Yes, that helps.
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 PR looks sensible. Thank you.
@ywwg, do you want to have a look as well.
Thank you! |
I think it is save to merge even without @ywwg having a look. |
I'm still curious why it was implemented this way. |
It's confusing that the "Update ReplayGain" action is shown in the track table menu but always greyed out (and it's pointless there anyway because the menu is not related to a deck).
This also reverts 576e2cf
It's okay to debug assert if a model is asked about a unsupported feature -- that line is never reached if we check for
!m_pTrackModel
when creating the "Update ReplayGain" action@ywwg What do you think?
gain
tooltip?