Edit annotations on double-click

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
tpavlicek
Posts: 61
Joined: Sun Jan 07, 2018 2:15 am

Edit annotations on double-click

Post by tpavlicek »

Hi to all,

I have created Pull Request #4903 which adds a way to edit content of simple and rich text annotations by double clicking on the view item. The motivation is quite simple, to speed up the whole working process.

Also maybe you have noticed both simple and rich text annotation editors can be dismissed by pressing Esc and for simple annotation, the multiline editor changes can be confirmed by pressing Ctrl+Enter. The rich text editor was missing this feature, so as a part of this pull request the functionality has been also added.

I hope you will like the changes, in case of any problems or suggestions please let me know.

Kind regards,


Tomas
User avatar
M4x
Veteran
Posts: 1480
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Edit annotations on double-click

Post by M4x »

So instead of renaming it you'd like to jump to editing the text itself? Is there a discussion thread to this PR (should've been created prior to the PR)?
tpavlicek
Posts: 61
Joined: Sun Jan 07, 2018 2:15 am

Re: Edit annotations on double-click

Post by tpavlicek »

Hello,

M4x wrote: Thu Jul 01, 2021 8:12 pm So instead of renaming it you'd like to jump to editing the text itself?
Probably you mean double-clicking on the tree view item? This is unchanged for both types. In the pull request the editor is brought up only when double-clicking on the annotation text in the page. At this moment double-clicking the annotation text does nothing, thus no existing functionality is harmed.

M4x wrote: Thu Jul 01, 2021 8:12 pm Is there a discussion thread to this PR (should've been created prior to the PR)?
Well, the discussion thread is this one :-) If the change won't get accepted, the pull request can be closed anytime. I have added link to this forum thread to the PR on GitHub so any of the collaborators can read our discussion before eventually merging or closing the PR. Additionally, anybody can also try out the proposed update by compiling FreeCAD with the PR code changes as these are now publicly available.

Kind regards,


Tomas
User avatar
M4x
Veteran
Posts: 1480
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Edit annotations on double-click

Post by M4x »

Yes, that's what I meant. Thank you!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Edit annotations on double-click

Post by uwestoehr »

tpavlicek wrote: Thu Jul 01, 2021 7:26 pm I have created Pull Request #4903 which adds a way to edit content of simple and rich text annotations by double clicking on the view item.
Many thanks! This is a nice addition.

I reviewed your code in Github. There is a change necessary to compile.
tpavlicek
Posts: 61
Joined: Sun Jan 07, 2018 2:15 am

Re: Edit annotations on double-click

Post by tpavlicek »

Hello Uwe,

thanks for Your review and valuable fix suggestion. I have added new commits with changes, if You will find some time to test them, I would be glad.

Kind regards,

Tomas
Post Reply