Merge pull request #14386 from ctrlaltdavid/M19820

Fix entities not loading when Interface doesn't have focus
This commit is contained in:
Jamil Akram 2018-11-13 13:45:42 -08:00 committed by GitHub
commit 822e4bfe48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6105,9 +6105,7 @@ void Application::update(float deltaTime) {
{ {
PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount()); PROFILE_RANGE_EX(app, "Overlays", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
PerformanceTimer perfTimer("overlays"); PerformanceTimer perfTimer("overlays");
if (qApp->shouldPaint()) { _overlays.update(deltaTime);
_overlays.update(deltaTime);
}
} }
// Update _viewFrustum with latest camera and view frustum data... // Update _viewFrustum with latest camera and view frustum data...
@ -6192,10 +6190,8 @@ void Application::update(float deltaTime) {
PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0); PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
PerformanceTimer perfTimer("postUpdateLambdas"); PerformanceTimer perfTimer("postUpdateLambdas");
std::unique_lock<std::mutex> guard(_postUpdateLambdasLock); std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
if (qApp->shouldPaint()) { for (auto& iter : _postUpdateLambdas) {
for (auto& iter : _postUpdateLambdas) { iter.second();
iter.second();
}
} }
_postUpdateLambdas.clear(); _postUpdateLambdas.clear();
} }