Changed the logic for whether to call setUpThreading() in setThreadingModel() to make it possible to changed threadings even if the threading model starts of as SingleThreaded

This commit is contained in:
Robert Osfield
2018-09-03 12:30:02 +01:00
parent 5040c583b4
commit ae3133522d

View File

@@ -205,13 +205,11 @@ void ViewerBase::setThreadingModel(ThreadingModel threadingModel)
{
if (_threadingModel == threadingModel) return;
bool needSetUpThreading = _threadsRunning;
if (_threadsRunning) stopThreading();
_threadingModel = threadingModel;
if (needSetUpThreading) setUpThreading();
if (isRealized() && _threadingModel!=SingleThreaded) setUpThreading();
}
ViewerBase::ThreadingModel ViewerBase::suggestBestThreadingModel()