Removing useless check
This commit is contained in:
@@ -471,7 +471,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -72,15 +72,13 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
|||||||
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
for(size_t i = 0; i < SelectionSvc->getSelection().size(); i++)
|
||||||
{
|
{
|
||||||
Instance* selection = SelectionSvc->getSelection()[i];
|
Instance* selection = SelectionSvc->getSelection()[i];
|
||||||
if(selection->canDelete && selection->getClassName() == "GroupInstance")
|
|
||||||
|
if(GroupInstance* model = dynamic_cast<GroupInstance*>(selection))
|
||||||
{
|
{
|
||||||
if(GroupInstance* model = dynamic_cast<GroupInstance*>(SelectionSvc->getSelection()[i]))
|
newinst = model->unGroup();
|
||||||
{
|
model->setParent(NULL);
|
||||||
newinst = model->unGroup();
|
delete model;
|
||||||
model->setParent(NULL);
|
model = NULL;
|
||||||
delete model;
|
|
||||||
model = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SelectionSvc->clearSelection();
|
SelectionSvc->clearSelection();
|
||||||
|
|||||||
Reference in New Issue
Block a user