From 25458a0ca772bf69ce39ef3b25f680d02239e662 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 3 May 2022 23:54:46 +0200 Subject: [PATCH] Do not allow changing tag target of Ogg Vorbis comments It has no effect anyways as tagparser does not allow to move a Vorbis comment from one stream to another this way. --- gui/tageditorwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/tageditorwidget.cpp b/gui/tageditorwidget.cpp index 7b8dbd4..9fc45cf 100644 --- a/gui/tageditorwidget.cpp +++ b/gui/tageditorwidget.cpp @@ -590,7 +590,8 @@ void TagEditorWidget::updateTagManagementMenu() // add "Remove tag" and "Change target" actions for (Tag *tag : m_tags) { // don't propose removal for Vorbis comments from Voribs or FLAC streams (removing from Opus streams should be ok) - if (tag->type() == TagType::OggVorbisComment) { + const auto tagType = tag->type(); + if (tagType == TagType::OggVorbisComment) { switch (static_cast(tag)->oggParams().streamFormat) { case GeneralMediaFormat::Vorbis: case GeneralMediaFormat::Flac: @@ -601,7 +602,7 @@ void TagEditorWidget::updateTagManagementMenu() connect(m_removeTagMenu->addAction(QString::fromUtf8(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::removeTag, this, tag)); - if (tag->supportsTarget()) { + if (tagType != TagType::OggVorbisComment && tag->supportsTarget()) { connect(m_changeTargetMenu->addAction(QString::fromUtf8(tag->toString().c_str())), &QAction::triggered, std::bind(&TagEditorWidget::changeTarget, this, tag)); }