[TD] handle deletions of hatches

- also uniform line endings in ViewProviderLeader.cpp
This commit is contained in:
donovaly
2020-03-07 18:33:16 +01:00
committed by WandererFan
parent 3307e4bf7a
commit c390d64df0
5 changed files with 22 additions and 9 deletions

View File

@@ -113,6 +113,7 @@ void ViewProviderHatch::onChanged(const App::Property* prop)
}
}
}
void ViewProviderHatch::updateData(const App::Property* prop)
{
Gui::ViewProviderDocumentObject::updateData(prop);
@@ -123,6 +124,14 @@ TechDraw::DrawHatch* ViewProviderHatch::getViewObject() const
return dynamic_cast<TechDraw::DrawHatch*>(pcObject);
}
bool ViewProviderHatch::canDelete(App::DocumentObject *obj) const
{
// deletion of hatches don't destroy anything
// thus we can pass this action
Q_UNUSED(obj)
return true;
}
Gui::MDIView *ViewProviderHatch::getMDIView() const
{
auto obj = getViewObject();
@@ -131,4 +140,3 @@ Gui::MDIView *ViewProviderHatch::getMDIView() const
if(!vp) return 0;
return vp->getMDIView();
}