Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -4472,7 +4472,11 @@ void Application::friendsWindowClosed() { · 4471 unmodified lines | |||
| 4472 | } | 4472 | } |
| 4473 | 4473 | ||
| 4474 | void Application::postLambdaEvent(std::function<void()> f) { | 4474 | void Application::postLambdaEvent(std::function<void()> f) { |
| 4475 | QCoreApplication::postEvent(this, new LambdaEvent(f)); | 4475 | if (this->thread() == QThread::currentThread()) { |
| 4476 | f(); | ||
| 4477 | } else { | ||
| 4478 | QCoreApplication::postEvent(this, new LambdaEvent(f)); | ||
| 4479 | } | ||
| 4476 | } | 4480 | } |
| 4477 | 4481 | ||
| 4478 | void Application::initPlugins() { | 4482 | void Application::initPlugins() { |