mirror of
https://gitlab.com/theadib/JSonRPCPlugin.git
synced 2026-08-30 16:10:23 +08:00
resolve: in case the file has a parent the file content is not displayed
This commit is contained in:
@@ -152,6 +152,7 @@ JsonRPCResult JsonRPCPlugin::execute(QString method, QMap<QString, QVariant> par
|
||||
newGroup->setName(objname);
|
||||
}
|
||||
|
||||
|
||||
QString parentname = params["parent"].toString().trimmed();
|
||||
if(!parentname.isEmpty())
|
||||
{
|
||||
@@ -159,10 +160,22 @@ JsonRPCResult JsonRPCPlugin::execute(QString method, QMap<QString, QVariant> par
|
||||
if(parent)
|
||||
{
|
||||
parent->addChild(newGroup);
|
||||
// in addChild the display assignment to child is only to the first child, not recursivly
|
||||
const auto display = m_app->getActiveGLWindow();
|
||||
if(display) {
|
||||
newGroup->setDisplay_recursive(display);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_app->addToDB(newGroup);
|
||||
|
||||
// after adding Zoom complete Scene into current display
|
||||
auto display = m_app->getActiveGLWindow();
|
||||
if(display) {
|
||||
display->zoomGlobal();
|
||||
}
|
||||
|
||||
need_redraw = true;
|
||||
result = JsonRPCResult::success(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user