diff --git a/plugins/gui/src/user_action/user_action_manager.cpp b/plugins/gui/src/user_action/user_action_manager.cpp index 8c5f90bb91a..f8d2551cb46 100644 --- a/plugins/gui/src/user_action/user_action_manager.cpp +++ b/plugins/gui/src/user_action/user_action_manager.cpp @@ -9,6 +9,7 @@ #include "gui/user_action/action_open_netlist_file.h" #include "gui/user_action/action_unfold_module.h" #include "gui/settings/settings_items/settings_item_checkbox.h" +#include "gui/python/python_context.h" #include "hal_core/utilities/log.h" #include #include @@ -39,10 +40,15 @@ namespace hal void UserActionManager::executeActionBlockThread(UserAction *act) { if (!act) return; - mMutex.lock(); - mThreadedAction = act; - Q_EMIT triggerExecute(); - mMutex.unlock(); + if (dynamic_cast(QThread::currentThread())) + { + mMutex.lock(); + mThreadedAction = act; + Q_EMIT triggerExecute(); + mMutex.unlock(); + } + else + act->exec(); } void UserActionManager::handleTriggerExecute()