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:
parent
5cb42f29e3
commit
4a765cc91f
@ -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;
|
||||
|
@ -93,7 +93,7 @@ protected:
|
||||
Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format);
|
||||
Glib::ustring getTempFilenameForParams( const Glib::ustring &filename );
|
||||
bool saveBatchQueue ();
|
||||
void notifyListener (bool queueRunning);
|
||||
void notifyListener ();
|
||||
|
||||
BatchQueueEntry* processing; // holds the currently processed image
|
||||
FileCatalog* fileCatalog;
|
||||
|
Loading…
x
Reference in New Issue
Block a user