From 1885f5d4894281369eb3d24d8cf7c6d2887b83d1 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:53:07 -0800 Subject: [PATCH] Improve proc params clear when XMP sync enabled Always check the rank and color label in the XMP if XMP sync is enabled when clearing the processing parameters. Allows the pp3 to be deleted whenever possible, even if the rank or color label has been edited. --- rtgui/thumbnail.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index b7f634b0e..e7f117101 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -1430,8 +1430,10 @@ void Thumbnail::updateProcParamsProperties(bool forceUpdate) if ((properties.rank.edited || forceUpdate) && rtengine::LIM(properties.rank.value, 0, 5) != rtengine::LIM(pparams->rank, 0, 5)) { pparams->rank = properties.rank; - pparamsValid |= properties.rank.edited; - if (!pparamsValid && forceUpdate) { + if (!forceUpdate) { + pparamsValid |= properties.rank.edited; + } + else if (!pparamsValid && forceUpdate) { // When force-updating, the processing parameters' rank needs not be // used if the embedded rank is the same. int initial_rank = 0; @@ -1443,8 +1445,10 @@ void Thumbnail::updateProcParamsProperties(bool forceUpdate) if ((properties.color.edited || forceUpdate) && properties.color != pparams->colorlabel) { pparams->colorlabel = properties.color; - pparamsValid |= properties.color.edited; - if (!pparamsValid && forceUpdate) { + if (!forceUpdate) { + pparamsValid |= properties.color.edited; + } + else if (!pparamsValid && forceUpdate) { // When force-updating, the processing parameters' color label needs // not be used if the embedded color label is the same. int initial_color = 0;