[FIXED] Tech Draw → undo button

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

[FIXED] Tech Draw → undo button

Post by kaktus »

Hello.

While checking the quality of TechDraw WB translations, I found an error. (yet another)

When using the tools from the TechDraw annotation toolbar, and using the undo button, the view drawing is deleted.
I don't think this is how it is supposed to work ...

https://vimeo.com/564764403


Can anyone confirm this?

:roll:
Last edited by kaktus on Mon Aug 01, 2022 4:42 am, edited 1 time in total.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [bug} Tech Draw → undo button

Post by openBrain »

There are errors appearing in the report view on your video but quality is too low to read this. Moreover as it isn't in English, I doubt I can understand what is reported. ;) Could you give details about that ?
mendy
Posts: 262
Joined: Mon May 21, 2018 2:16 pm

Re: [bug} Tech Draw → undo button

Post by mendy »

It's just the way the module is coded. Plenty of posts stating after creating a cosmetic item to delete you have to click on it and use the eraser tool.
AFIK it was not programmed in manner that undo was aware of the cosmetic additions.

Also you discussed basically the same questions in

https://forum.freecadweb.org/viewtopic.php?f=35&t=59527

If you want you can code a fix and submit a PR.
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: [bug} Tech Draw → undo button

Post by kaktus »

mendy wrote: Wed Jun 23, 2021 11:44 am
...

AFIK it was not programmed in manner that undo was aware of the cosmetic additions.

...
Well, that's where the problem lies.
mendy wrote: Wed Jun 23, 2021 11:44 am Also you discussed basically the same questions in

https://forum.freecadweb.org/viewtopic.php?f=35&t=59527
agreed
openBrain wrote: Wed Jun 23, 2021 9:06 am There are errors appearing in the report view on your video but quality is too low to read this. Moreover as it isn't in English, I doubt I can understand what is reported. ;) Could you give details about that ?
Prepared video has no narration. I made them on short notice.
Yes, the program interface is in Polish, but the positions of all options are identical in other languages.

If you are interested in details, ask a specific question, I will answer you in detail. ;)
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
tpavlicek
Posts: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: [bug} Tech Draw → undo button

Post by tpavlicek »

Hi,

I checked the source code and the Undo/Redo was really not implemented for Cosmetic Vertices and Lines. Fortunately, the fix is quite easy, so I have created Pull Request #4895 to add the functionality.

If you would encounter any problems or have any suggestions for changes/improvements, please let me know.

Kind regards,

Tomas
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: [bug} Tech Draw → undo button

Post by kaktus »

tpavlicek wrote: Mon Jun 28, 2021 1:55 pm
...

If you would encounter any problems or have any suggestions for changes/improvements, please let me know.

Kind regards,

Tomas
With your involvement you have made me very happy.

There is a second topic with a related error. https://forum.freecadweb.org/viewtopic. ... 35&t=59527
I don't know if you looked at it.

Thank you for your work for the entire FreeCAD community.

My sincere greetings to you. :mrgreen:
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
tpavlicek
Posts: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: [bug} Tech Draw → undo button

Post by tpavlicek »

Hello,

kaktus wrote: Mon Jun 28, 2021 4:52 pm There is a second topic with a related error. https://forum.freecadweb.org/viewtopic. ... 35&t=59527
I don't know if you looked at it.
I was playing with the center lines and undo/redo seems to work fine, the only problem was the view not getting updated once one presses the button. Nevertheless, this should be fixed by the pull request as well.

Kind regards,


Tomas
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: [bug} Tech Draw → undo button

Post by kaktus »

:mrgreen:

You are amazing.
Thank you. :!:
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: [bug} Tech Draw → undo button

Post by kaktus »

tpavlicek wrote: Mon Jun 28, 2021 1:55 pm Hi,

I checked the source code and the Undo/Redo was really not implemented for Cosmetic Vertices and Lines. Fortunately, the fix is quite easy, so I have created Pull Request #4895 to add the functionality.

If you would encounter any problems or have any suggestions for changes/improvements, please let me know.

Kind regards,

Tomas


Hi @tpavlicek.

Your PR has been implemented. And the undesirable effect of the model disappearing when using the undo redo stack no longer exists.
Thank you for your contribution.

However, there is still an unsolved problem of the model disappearing when closing the tool window (task panel) with the cancel button.
Applies to tools :
Create Center Line
Add Centerline between 2 Lines
Add Centerline between 2 Points

Will you be able to take a look at it :?:
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [bug} Tech Draw → undo button

Post by wandererfan »

kaktus wrote: Tue May 10, 2022 4:19 am However, there is still an unsolved problem of the model disappearing when closing the tool window (task panel) with the cancel button.
Applies to tools :
Create Center Line
Add Centerline between 2 Lines
Add Centerline between 2 Points
I can't duplicate "the model disappearing". Can you provide step by step instructions please?

I did notice an issue with multiple centerlines when canceling an edit of 1 line, all the centerlines are removed.
Post Reply