osgViewer::ViewerBase setThreadingModel func fix: should not start threading, must only restart

This commit is contained in:
Konstantin S. Matveyev 2018-01-13 15:46:53 +03:00
parent ae57f3cd46
commit bb84f1ea3c

View File

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