Partially solving issue 1788: "Crashing during processing of queue"

It also correct a bug of wrong image orientation (was wrong in the File Browser while good in the Editor tab)

This patch also introduce several speed optimizations like:
   - switch between File Browser and Editor tab in Single Editor mode
   - asynchronous computation of the Batch Queue's thumbnails
   - quick start of RT even with a huge queue
   - less GUI overhead when applying a profile to multiple thumbs in the File Browser
This commit is contained in:
natureh 510
2013-06-16 15:49:47 +02:00
parent b907d54e0e
commit 54c6a6cbb9
50 changed files with 1810 additions and 783 deletions

View File

@@ -27,6 +27,7 @@ using namespace rtengine::procparams;
BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolPanelCoordinator(), parent(parent) {
blockedUpdate = false;
// remove exif panel and iptc panel
std::vector<ToolPanel*>::iterator epi = std::find (toolPanels.begin(), toolPanels.end(), exifpanel);
if (epi!=toolPanels.end())
@@ -56,13 +57,13 @@ void BatchToolPanelCoordinator::selectionChanged (const std::vector<Thumbnail*>&
void BatchToolPanelCoordinator::closeSession (bool save) {
pparamsEdited.set (false);
pparamsEdited.set (false);
for (size_t i=0; i<selected.size(); i++)
selected[i]->removeThumbnailListener (this);
if (somethingChanged && save) {
// read new values from the gui
for (size_t i=0; i<toolPanels.size(); i++)
toolPanels[i]->write (&pparams, &pparamsEdited);
@@ -73,11 +74,11 @@ void BatchToolPanelCoordinator::closeSession (bool save) {
newParams = initialPP[i];
pparamsEdited.combine (newParams, pparams, selected.size()==1);
// trim new adjuster's values to the adjuster's limits
for (unsigned int j=0; j<toolPanels.size(); j++)
toolPanels[j]->trimValues (&newParams);
// trim new adjuster's values to the adjuster's limits
for (unsigned int j=0; j<toolPanels.size(); j++)
toolPanels[j]->trimValues (&newParams);
selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, true);
selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, true);
}
}
for (size_t i=0; i<paramcListeners.size(); i++)
@@ -333,12 +334,28 @@ void BatchToolPanelCoordinator::optionsChanged () {
void BatchToolPanelCoordinator::procParamsChanged (Thumbnail* thm, int whoChangedIt) {
if (whoChangedIt!=BATCHEDITOR) {
if (whoChangedIt!=BATCHEDITOR && !blockedUpdate) {
closeSession (false);
initSession ();
}
}
void BatchToolPanelCoordinator::beginBatchPParamsChange(int numberOfEntries) {
blockedUpdate = true;
if (numberOfEntries > 50) // Arbitrary amount
parent->set_sensitive(false);
}
// The end of a batch pparams change triggers a close/initsession
void BatchToolPanelCoordinator::endBatchPParamsChange() {
//printf("BatchToolPanelCoordinator::endBatchPParamsChange / Nouvelle session!\n");
closeSession (false);
initSession ();
blockedUpdate = false;
parent->set_sensitive(true);
}
/*
* WARNING: profileChange is actually called by the History only.
* Using a Profile panel in the batch tool panel editor is actually