@@ -123,39 +123,48 @@ void Matroska::Tag::setSegmentTitle(const String& title)
123123 d->segmentTitle = title;
124124}
125125
126+ bool Matroska::Tag::setTag (const String &key, const String &value)
127+ {
128+ bool found = d->setTag (key, value);
129+ if (found) {
130+ setNeedsRender (true );
131+ }
132+ return found;
133+ }
134+
126135void Matroska::Tag::setTitle (const String &s)
127136{
128- d-> setTag (" TITLE" , s);
137+ setTag (" TITLE" , s);
129138}
130139
131140void Matroska::Tag::setArtist (const String &s)
132141{
133- d-> setTag (" ARTIST" , s);
142+ setTag (" ARTIST" , s);
134143}
135144
136145void Matroska::Tag::setAlbum (const String &s)
137146{
138- d-> setTag (" ALBUM" , s);
147+ setTag (" ALBUM" , s);
139148}
140149
141150void Matroska::Tag::setComment (const String &s)
142151{
143- d-> setTag (" COMMENT" , s);
152+ setTag (" COMMENT" , s);
144153}
145154
146155void Matroska::Tag::setGenre (const String &s)
147156{
148- d-> setTag (" GENRE" , s);
157+ setTag (" GENRE" , s);
149158}
150159
151160void Matroska::Tag::setYear (unsigned int i)
152161{
153- d-> setTag (" DATE" , i != 0 ? String::number (i) : String ());
162+ setTag (" DATE" , i != 0 ? String::number (i) : String ());
154163}
155164
156165void Matroska::Tag::setTrack (unsigned int i)
157166{
158- d-> setTag (" TRACKNUMBER" , i != 0 ? String::number (i) : String ());
167+ setTag (" TRACKNUMBER" , i != 0 ? String::number (i) : String ());
159168}
160169
161170String Matroska::Tag::title () const
@@ -468,11 +477,12 @@ PropertyMap Matroska::Tag::setProperties(const PropertyMap &propertyMap)
468477
469478void Matroska::Tag::removeUnsupportedProperties (const StringList& properties)
470479{
471- d->removeSimpleTags (
472- [&properties](const SimpleTag &t) {
473- return properties.contains (t.name ());
474- }
475- );
480+ if (d->removeSimpleTags (
481+ [&properties](const SimpleTag& t) {
482+ return properties.contains (t.name ());
483+ }) > 0 ) {
484+ setNeedsRender (true );
485+ }
476486}
477487
478488StringList Matroska::Tag::complexPropertyKeys () const
@@ -526,14 +536,15 @@ bool Matroska::Tag::setComplexProperties(const String& key, const List<VariantMa
526536 // Pictures are handled at the file level
527537 return false ;
528538 }
529- d->removeSimpleTags (
530- [&key](const SimpleTag &t) {
531- return t.name () == key &&
532- (t.type () != SimpleTag::StringType ||
533- t.trackUid () != 0 ||
534- translateTag (t.name (), t.targetTypeValue ()).isEmpty ());
535- }
536- );
539+ if (d->removeSimpleTags (
540+ [&key](const SimpleTag &t) {
541+ return t.name () == key &&
542+ (t.type () != SimpleTag::StringType ||
543+ t.trackUid () != 0 ||
544+ translateTag (t.name (), t.targetTypeValue ()).isEmpty ());
545+ }) > 0 ) {
546+ setNeedsRender (true );
547+ }
537548 bool result = false ;
538549 for (const auto &property : value) {
539550 if (property.value (" name" ).value <String>() == key &&
0 commit comments