Avoid unnecessary update to main preview when opening first detail window, fixes #4368
This commit is contained in:
parent
06fedfdac7
commit
1f42e5cdd4
@ -90,7 +90,7 @@ ImProcCoordinator::ImProcCoordinator ()
|
|||||||
pW (-1), pH (-1),
|
pW (-1), pH (-1),
|
||||||
plistener (nullptr), imageListener (nullptr), aeListener (nullptr), acListener (nullptr), abwListener (nullptr), awbListener (nullptr), frameCountListener (nullptr), imageTypeListener (nullptr), actListener (nullptr), adnListener (nullptr), awavListener (nullptr), dehaListener (nullptr), hListener (nullptr),
|
plistener (nullptr), imageListener (nullptr), aeListener (nullptr), acListener (nullptr), abwListener (nullptr), awbListener (nullptr), frameCountListener (nullptr), imageTypeListener (nullptr), actListener (nullptr), adnListener (nullptr), awavListener (nullptr), dehaListener (nullptr), hListener (nullptr),
|
||||||
resultValid (false), lastOutputProfile ("BADFOOD"), lastOutputIntent (RI__COUNT), lastOutputBPC (false), thread (nullptr), changeSinceLast (0), updaterRunning (false), destroying (false), utili (false), autili (false),
|
resultValid (false), lastOutputProfile ("BADFOOD"), lastOutputIntent (RI__COUNT), lastOutputBPC (false), thread (nullptr), changeSinceLast (0), updaterRunning (false), destroying (false), utili (false), autili (false),
|
||||||
butili (false), ccutili (false), cclutili (false), clcutili (false), opautili (false), wavcontlutili (false), colourToningSatLimit (0.f), colourToningSatLimitOpacity (0.f)
|
butili (false), ccutili (false), cclutili (false), clcutili (false), opautili (false), wavcontlutili (false), colourToningSatLimit (0.f), colourToningSatLimitOpacity (0.f), highQualityComputed (false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void ImProcCoordinator::assign (ImageSource* imgsrc)
|
void ImProcCoordinator::assign (ImageSource* imgsrc)
|
||||||
@ -1388,5 +1388,26 @@ void ImProcCoordinator::endUpdateParams (int changeFlags)
|
|||||||
startProcessing ();
|
startProcessing ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ImProcCoordinator::getHighQualComputed() {
|
||||||
|
// this function may only be called from detail windows
|
||||||
|
if(!highQualityComputed) {
|
||||||
|
if(options.prevdemo == PD_Sidecar) {
|
||||||
|
// we already have high quality preview
|
||||||
|
setHighQualComputed();
|
||||||
|
} else {
|
||||||
|
for (size_t i = 0; i < crops.size() - 1; ++i) { // -1, because last entry is the freshly created detail window
|
||||||
|
if (crops[i]->get_skip() == 1 ) { // there is at least one crop with skip == 1 => we already have high quality preview
|
||||||
|
setHighQualComputed();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return highQualityComputed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImProcCoordinator::setHighQualComputed() {
|
||||||
|
highQualityComputed = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -212,6 +212,7 @@ protected:
|
|||||||
void process ();
|
void process ();
|
||||||
float colourToningSatLimit;
|
float colourToningSatLimit;
|
||||||
float colourToningSatLimitOpacity;
|
float colourToningSatLimitOpacity;
|
||||||
|
bool highQualityComputed;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -266,7 +267,8 @@ public:
|
|||||||
void getCamWB (double& temp, double& green);
|
void getCamWB (double& temp, double& green);
|
||||||
void getSpotWB (int x, int y, int rectSize, double& temp, double& green);
|
void getSpotWB (int x, int y, int rectSize, double& temp, double& green);
|
||||||
void getAutoCrop (double ratio, int &x, int &y, int &w, int &h);
|
void getAutoCrop (double ratio, int &x, int &y, int &w, int &h);
|
||||||
|
bool getHighQualComputed();
|
||||||
|
void setHighQualComputed();
|
||||||
void setMonitorProfile (const Glib::ustring& profile, RenderingIntent intent);
|
void setMonitorProfile (const Glib::ustring& profile, RenderingIntent intent);
|
||||||
void getMonitorProfile (Glib::ustring& profile, RenderingIntent& intent) const;
|
void getMonitorProfile (Glib::ustring& profile, RenderingIntent& intent) const;
|
||||||
void setSoftProofing (bool softProof, bool gamutCheck);
|
void setSoftProofing (bool softProof, bool gamutCheck);
|
||||||
|
@ -440,6 +440,9 @@ public:
|
|||||||
* @return the height of the preview image */
|
* @return the height of the preview image */
|
||||||
virtual int getPreviewHeight () = 0;
|
virtual int getPreviewHeight () = 0;
|
||||||
|
|
||||||
|
virtual bool getHighQualComputed() = 0;
|
||||||
|
virtual void setHighQualComputed() = 0;
|
||||||
|
|
||||||
virtual bool updateTryLock() = 0;
|
virtual bool updateTryLock() = 0;
|
||||||
|
|
||||||
virtual void updateUnLock() = 0;
|
virtual void updateUnLock() = 0;
|
||||||
|
@ -505,8 +505,9 @@ void ImageArea::addCropWindow ()
|
|||||||
|
|
||||||
mainCropWindow->setObservedCropWin (cropWins.front());
|
mainCropWindow->setObservedCropWin (cropWins.front());
|
||||||
|
|
||||||
if(cropWins.size() == 1) { // after first detail window we already have high quality
|
if(!ipc->getHighQualComputed()) {
|
||||||
ipc->startProcessing(M_HIGHQUAL);
|
ipc->startProcessing(M_HIGHQUAL);
|
||||||
|
ipc->setHighQualComputed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user