resolve: in case the file has a parent the file content is not displayed

This commit is contained in:
theadib
2021-02-06 20:50:13 +01:00
parent 932ea1b449
commit 890e00a3d9
+13
View File
@@ -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);
}