do not save IPTC tags in the arp if they are unchanged
(cherry picked from commit c4c642794868c2b03fd824acc0a7db962162c16f)
This commit is contained in:
parent
2ce81cccc5
commit
a0e9a59606
@ -461,34 +461,41 @@ IPTCPanel::IPTCPanel():
|
||||
show_all();
|
||||
}
|
||||
|
||||
|
||||
void IPTCPanel::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
disableListener();
|
||||
changeList->clear();
|
||||
|
||||
if (!pp->metadata.iptc.empty()) {
|
||||
*changeList = pp->metadata.iptc;
|
||||
changelist_valid_ = true;
|
||||
} else {
|
||||
*changeList = *embeddedData;
|
||||
changelist_valid_ = false;
|
||||
}
|
||||
|
||||
applyChangeList();
|
||||
enableListener();
|
||||
}
|
||||
|
||||
|
||||
void IPTCPanel::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
pp->metadata.iptc = *changeList;
|
||||
if (changelist_valid_) {
|
||||
pp->metadata.iptc = *changeList;
|
||||
} else {
|
||||
pp->metadata.iptc.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IPTCPanel::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
*defChangeList = defParams->metadata.iptc;
|
||||
}
|
||||
|
||||
|
||||
void IPTCPanel::setImageData(const FramesMetaData* id)
|
||||
{
|
||||
embeddedData->clear();
|
||||
@ -510,9 +517,9 @@ void IPTCPanel::setImageData(const FramesMetaData* id)
|
||||
file->set_sensitive(!embeddedData->empty());
|
||||
}
|
||||
|
||||
|
||||
void IPTCPanel::notifyListener()
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged(EvIPTC, M("HISTORY_CHANGED"));
|
||||
}
|
||||
@ -628,7 +635,7 @@ void IPTCPanel::delSuppCategory()
|
||||
|
||||
void IPTCPanel::updateChangeList()
|
||||
{
|
||||
|
||||
changelist_valid_ = true;
|
||||
changeList->clear();
|
||||
(*changeList)[CAPTION].push_back(captionText->get_text());
|
||||
(*changeList)[CAPTION_WRITER].push_back(captionWriter->get_text());
|
||||
@ -756,9 +763,9 @@ void IPTCPanel::applyChangeList()
|
||||
|
||||
void IPTCPanel::resetClicked()
|
||||
{
|
||||
|
||||
disableListener();
|
||||
*changeList = *defChangeList;
|
||||
changelist_valid_ = false;
|
||||
applyChangeList();
|
||||
enableListener();
|
||||
notifyListener();
|
||||
|
@ -34,6 +34,7 @@ private:
|
||||
const std::unique_ptr<rtengine::procparams::IPTCPairs> changeList;
|
||||
const std::unique_ptr<rtengine::procparams::IPTCPairs> defChangeList;
|
||||
const std::unique_ptr<rtengine::procparams::IPTCPairs> embeddedData;
|
||||
bool changelist_valid_;
|
||||
|
||||
Gtk::TextView* captionView;
|
||||
Glib::RefPtr<Gtk::TextBuffer> captionText;
|
||||
|
Loading…
x
Reference in New Issue
Block a user