fixed a bug where 'Show cover in full size' and 'Unset cover' actions were incorrectly being disabled in the 'Now playing' widget
This commit is contained in:
parent
06c62f169f
commit
35441d829e
|
@ -362,12 +362,12 @@ void NowPlayingWidget::contextMenuEvent(QContextMenuEvent* e) {
|
||||||
album_cover_choice_controller_->search_for_cover_action()->setEnabled(false);
|
album_cover_choice_controller_->search_for_cover_action()->setEnabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const bool art_is_set =
|
const bool art_is_not_set =
|
||||||
!metadata_.art_manual().isEmpty() &&
|
metadata_.art_manual() == AlbumCoverLoader::kManuallyUnsetCover
|
||||||
metadata_.art_manual() != AlbumCoverLoader::kManuallyUnsetCover;
|
|| (metadata_.art_automatic().isEmpty() && metadata_.art_manual().isEmpty());
|
||||||
|
|
||||||
album_cover_choice_controller_->unset_cover_action()->setEnabled(art_is_set);
|
album_cover_choice_controller_->unset_cover_action()->setEnabled(!art_is_not_set);
|
||||||
album_cover_choice_controller_->show_cover_action()->setEnabled(art_is_set);
|
album_cover_choice_controller_->show_cover_action()->setEnabled(!art_is_not_set);
|
||||||
|
|
||||||
menu_->popup(mapToGlobal(e->pos()));
|
menu_->popup(mapToGlobal(e->pos()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue