Fix color label with default profile bug

Prevent the color label, rating, and trash status from being reset when
resetting a photo to the default processing profile.

Closes #5936.
This commit is contained in:
Lawrence Lee
2021-01-24 18:10:02 -08:00
parent 8ca07e8584
commit 78209d3c96

View File

@@ -985,11 +985,19 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
}
for (size_t i = 0; i < mselected.size(); i++) {
mselected[i]->thumbnail->createProcParamsForUpdate (false, true);
const auto thumbnail = mselected[i]->thumbnail;
const auto rank = thumbnail->getRank();
const auto colorLabel = thumbnail->getColorLabel();
const auto stage = thumbnail->getStage();
thumbnail->createProcParamsForUpdate (false, true);
thumbnail->setRank(rank);
thumbnail->setColorLabel(colorLabel);
thumbnail->setStage(stage);
// Empty run to update the thumb
rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams ();
mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER, true, true);
rtengine::procparams::ProcParams params = thumbnail->getProcParams ();
thumbnail->setProcParams (params, nullptr, FILEBROWSER, true, true);
}
if (!mselected.empty() && bppcl) {