Unwanted dependency message on deletion

Discussions about the development of the TechDraw workbench
chrisb
Posts: 15174
Joined: Tue Mar 17, 2015 9:14 am

Unwanted dependency message on deletion

Postby chrisb » Mon Feb 11, 2019 9:21 am

If I delete a dimension from a page, I get a warning message:
These items are linked to items selected for deletion and might break.

Page

Are you sure you want to continue?
I can see from the dependency graph why this is so, but from a user's view it is strange. The use case is similar to having added a feature in PartDesign or a constraint in Sketcher, and there I never get such a message. Such a message makes me always uncomfortable because I don't know if something might really break - besides removing the measure, which I requested.

So my first question is, if there is a use case where something breaks?

And if not, is it possible to remove this question? I fear it comes from the very depths of FreeCAD.
wandererfan
Posts: 2571
Joined: Tue Nov 06, 2012 5:42 pm

Re: Unwanted dependency message on deletion

Postby wandererfan » Mon Feb 11, 2019 2:37 pm

chrisb wrote:
Mon Feb 11, 2019 9:21 am
If I delete a dimension from a page, I get a warning message:
...
I can see from the dependency graph why this is so, but from a user's view it is strange. The use case is similar to having added a feature in PartDesign or a constraint in Sketcher, and there I never get such a message. Such a message makes me always uncomfortable because I don't know if something might really break - besides removing the measure, which I requested.

So my first question is, if there is a use case where something breaks?

And if not, is it possible to remove this question? I fear it comes from the very depths of FreeCAD.
IIRC, deleting a linked DocumentObject (should) always displays this message. It comes from Gui::StdCmdDelete. Constraints are not DocumentObjects(?) so the message doesn't appear . Not sure why deleting a Feature from the chain doesn't trigger this message, because a PartDesign::Feature is a descendant of DocumentObject. Maybe PD uses it's own delete logic? I will have to investigate.

I don't believe there is a use case where deleting a Dimension breaks the View/Page. There were problems earlier in development, but they should all be fixed by now.