X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_part.h;h=a81334270edc369fa24f5b4a449ca6e180d78d28;hb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;hp=4f6e9e396bbb70325505cfd7f7cce191ead95e3b;hpb=a69d242f3f00207d6ea7320e6723775f4b0dbfb3;p=dcpomatic.git diff --git a/src/lib/content_part.h b/src/lib/content_part.h index 4f6e9e396..a81334270 100644 --- a/src/lib/content_part.h +++ b/src/lib/content_part.h @@ -23,7 +23,7 @@ #define DCPOMATIC_CONTENT_PART_H #include "content.h" -#include +#include "change_signaller.h" #include class Content; @@ -41,28 +41,30 @@ protected: void maybe_set (T& member, T new_value, int property) const { + ChangeSignaller cc (_parent, property); { boost::mutex::scoped_lock lm (_mutex); if (member == new_value) { + cc.abort (); return; } member = new_value; } - _parent->signal_changed (property); } template void maybe_set (boost::optional& member, T new_value, int property) const { + ChangeSignaller cc (_parent, property); { boost::mutex::scoped_lock lm (_mutex); if (member && member.get() == new_value) { + cc.abort (); return; } member = new_value; } - _parent->signal_changed (property); } Content* _parent;