realthunder / FreeCAD

Link branch FreeCAD
Other
787 stars 45 forks source link

TechDraw - fails to select objects or fails to operate on selected objects #885

Open thx1111 opened 1 year ago

thx1111 commented 1 year ago

Arch Linux Name : freecad-linkstage3-git Version : 20230811tip.r0.gd31fdf6ab7-1 branch=LinkMerge

TechDraw - fails to select objects or fails to operate on selected objects. For instance, after adding a cosmetic line, the cosmetic line can be selected, but then "Remove Cosmetic Object" will not remove the line. Other cosmetic operations, like Centerline, do nothing. In the case of "Remove Cosmetic Object", this is may be resolved by manually selecting "Recompute object".

In another instance, after adding a Detail View to a Section View, objects within the Detail View circle in the Section View cannot be selected. In this case, temporarily moving the position of the Detail View selection off of the objects will allow the objects to be selected. But then restoring the Detail View selection position can leave some objects in the Detail View corrupted. The corrupted objects, cosmetic lines particularly, and dimensions derived from these cosmetic lines, must be deleted and then recreated.

There are also many QPainter::end: Painter not active, aborted errors.

thx1111 commented 1 year ago

FreeCAD 0.21.0 Revision: 36901 (Git) Arch Linux freecad-linkstage3-git-20230811tip.r22.g20f0f1a070-1-x86_64.pkg.tar.zst commit/37f855dc130caa7c5ec33eb315e0b0c664ede8d9

Thanks, that seems to fix the first issue. "Remove Cosmetic Object" now works as expected on a Cosmetic Line.

Still having the second issue. For instance, a Line in Section View passing "underneath" the circle of a Detail View in the Section View will "highlight on hover", but cannot be "selected". For a line that continues both "underneath" and "outside" of the Detail View, the line can be selected anywhere outside of the Detail View circle, but just not anywhere "underneath" the Detail View circle. Because the "highlight on hover" seems to always work normally, I suppose that the problem is somewhere between the "mouse click" and the "selected" state of the object.

However, I'm just noticing, those same features can be selected from inside the actual Detail View. A visible difference is in the operation seen with, for instance, a line crossing the circle in the Section View. Specifically, selecting that line from the actual Detail View only selects that portion of the line inside the Detail View. NOTE: actually deleting that portion of the line inside the Detail View corrupts the entire Detail View. The actual Line is not deleted, but all of the dimensions on the Detail View disappear, and "Undo", even followed by a manual Recompute Object, fails to recover the lost Dimensions!