[TD] handle object deletions better

see https://forum.freecadweb.org/viewtopic.php?p=366902#p366902
This commit is contained in:
donovaly
2020-03-03 03:54:08 +01:00
committed by WandererFan
parent b25ca7194c
commit def5159c38
10 changed files with 175 additions and 7 deletions

View File

@@ -221,3 +221,12 @@ void ViewProviderDimension::handleChangedPropertyType(Base::XMLReader &reader, c
LineWidth.setValue(LineWidthProperty.getValue());
}
}
bool ViewProviderDimension::canDelete(App::DocumentObject *obj) const
{
// deletions of objects from a ProjGroupItem don't necesarily destroy anything
// thus we can pass this action
// we can warn the user if necessary in the object's ViewProvider in the onDelete() function
Q_UNUSED(obj)
return true;
}