Skip to content

Commit

Permalink
Bugfix: Python thread must block thread when executing user actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Jun 10, 2024
1 parent 1194a35 commit 82e31f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/gui/src/gui_api/gui_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,7 @@ namespace hal
bool GuiApiClasses::View::setGridPlacement(int viewId, GridPlacement *gp)
{
ActionMoveNode* act = new ActionMoveNode(viewId, gp);
act->exec();

UserActionManager::instance()->executeActionBlockThread(act);
return true;
}

Expand All @@ -958,7 +957,7 @@ namespace hal
int GuiApiClasses::Directory::createNewDirectory(const std::string& name)
{
ActionCreateObject* act = new ActionCreateObject(UserActionObjectType::ContextDir, QString::fromStdString(name));
act->exec();
UserActionManager::instance()->executeActionBlockThread(act);
auto id = act->object().id();
return id;
}
Expand All @@ -969,6 +968,6 @@ namespace hal
gGraphContextManager->deleteContextDirectory(directory);*/
ActionDeleteObject* act = new ActionDeleteObject();
act->setObject(UserActionObject(id, UserActionObjectType::ContextDir));
act->exec();
UserActionManager::instance()->executeActionBlockThread(act);
}
}

0 comments on commit 82e31f6

Please sign in to comment.