[Fixed] TechDraw source code RichTextAnnotation artifacts

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[Fixed] TechDraw source code RichTextAnnotation artifacts

Post by Kunda1 »

Looks like there is somewhat duplicate code (although commented out) in TD source between Gui/CommandAnnotate.cpp and Gui/CommandDecorate.cpp

https://github.com/FreeCAD/FreeCAD/blob ... #L153-L204
https://github.com/FreeCAD/FreeCAD/blob ... #L136-L194

Is it OK to remove the latter ?
Although the commented out code has some extra code that I wondered could be useful (but it may be just written differently in CommandAnnotate.cpp file. Can someone check please?
Last edited by Kunda1 on Wed Aug 11, 2021 5:15 pm, edited 1 time in total.
Reason: Marked thread [FIXED]
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
M4x
Veteran
Posts: 1481
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: TechDraw source code RichTextAnnotation artifacts

Post by M4x »

Push
tpavlicek
Posts: 61
Joined: Sun Jan 07, 2018 2:15 am

Re: TechDraw source code RichTextAnnotation artifacts

Post by tpavlicek »

From my point of view it is pretty much safe to remove the code from Gui/CommandDecorate.cpp. The additional code lines are rather an artifact from copied and pasted "Add Leader Line" code.

Kind regards,


Tomas
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: TechDraw source code RichTextAnnotation artifacts

Post by Kunda1 »

I don't have time ATM to do this. Anyone interested in house cleaning this?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
tpavlicek
Posts: 61
Joined: Sun Jan 07, 2018 2:15 am

Re: TechDraw source code RichTextAnnotation artifacts

Post by tpavlicek »

Hi,

I have created Pull Request #4904 for the removal.

Kind regards,


Tomas
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: TechDraw source code RichTextAnnotation artifacts

Post by kkremitzki »

Merged
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Fixed] TechDraw source code RichTextAnnotation artifacts

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply