Unify inconsistent notifyListener() logic
Previously, this function required a `queueEmptied` bool, which I changed to `queueRunning`. But I goofed the logic on this bool; it should always be "is `processing` nullptr."
This commit is contained in:
@@ -229,7 +229,7 @@ void BatchQueue::addEntries (const std::vector<BatchQueueEntry*>& entries, bool
|
||||
saveBatchQueue ();
|
||||
|
||||
redraw ();
|
||||
notifyListener (true);
|
||||
notifyListener ();
|
||||
}
|
||||
|
||||
bool BatchQueue::saveBatchQueue ()
|
||||
@@ -387,7 +387,7 @@ bool BatchQueue::loadBatchQueue ()
|
||||
}
|
||||
|
||||
redraw ();
|
||||
notifyListener (true);
|
||||
notifyListener ();
|
||||
|
||||
return !fd.empty ();
|
||||
}
|
||||
@@ -460,7 +460,7 @@ void BatchQueue::cancelItems (const std::vector<ThumbBrowserEntryBase*>& items)
|
||||
saveBatchQueue ();
|
||||
|
||||
redraw ();
|
||||
notifyListener (true);
|
||||
notifyListener ();
|
||||
}
|
||||
|
||||
void BatchQueue::headItems (const std::vector<ThumbBrowserEntryBase*>& items)
|
||||
@@ -775,8 +775,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
|
||||
}
|
||||
|
||||
redraw ();
|
||||
const bool queueRunning = processing;
|
||||
notifyListener (queueRunning);
|
||||
notifyListener ();
|
||||
|
||||
return processing ? processing->job : nullptr;
|
||||
}
|
||||
@@ -971,9 +970,9 @@ void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionDa
|
||||
}
|
||||
}
|
||||
|
||||
void BatchQueue::notifyListener (bool queueRunning)
|
||||
void BatchQueue::notifyListener ()
|
||||
{
|
||||
|
||||
const bool queueRunning = processing;
|
||||
if (listener) {
|
||||
NLParams* params = new NLParams;
|
||||
params->listener = listener;
|
||||
|
Reference in New Issue
Block a user