[implemented] Undo functionality in tree selection

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
sirvinskasp
Posts: 6
Joined: Fri Oct 07, 2022 9:56 am

[implemented] Undo functionality in tree selection

Post by sirvinskasp »

Hello,

First time here, so not an expert in FreeCAD.

My job is creating assembly instructions for various electronics. I work mainly with tree selection, so turning layers on/off multiple times. It is very annoying that "undo" [Ctrl+Z] does not work when I'm trying to restore hidden layers/parts, I always have to scroll through the whole tree, find the part that I had hidden by just selecting it in the 3d view and hitting [space] and turn it back on again, when I could have just hit [Ctrl-Z] a couple of times (just like in other CAD software).

I was browsing this forum/wiki/youtube for a long time already but could not find the answer.

Is there a way to fix this? I would really appreciate the answer.

Thanks in advance! :)

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Last edited by sirvinskasp on Fri Oct 07, 2022 10:36 am, edited 2 times in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Undo functionality in tree selection

Post by Kunda1 »

Hello. Welcome to the FreeCAD forum (notice the spelling of FreeCAD ;) ).

What version of FreeCAD are you using? Please always add your full About info when asking for help, it saves time for us trying to troubleshoot issues.
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
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Undo functionality in tree selection

Post by wmayer »

Is there a way to fix this? I would really appreciate the answer.
There is a way to do this when changing the Visibility item inside the property editor (View) instead. However, this option is off by default and you have to enable it, first:
* Open the parameter editor (Tools > Edit parameter)
* Navigate to BaseApp > Preferences > PropertyView
* Create a boolean key with the name AutoTransactionView and set its value to true
* Restart FreeCAD

For the tree view we can think about adding this option, too.
sirvinskasp
Posts: 6
Joined: Fri Oct 07, 2022 9:56 am

Re: Undo functionality in tree selection

Post by sirvinskasp »

Kunda1 wrote: Fri Oct 07, 2022 10:13 am Hello. Welcome to the FreeCAD forum (notice the spelling of FreeCAD ;) ).

What version of FreeCAD are you using? Please always add your full About info when asking for help, it saves time for us trying to troubleshoot issues.
Note taken!
sirvinskasp
Posts: 6
Joined: Fri Oct 07, 2022 9:56 am

Re: Undo functionality in tree selection

Post by sirvinskasp »

wmayer wrote: Fri Oct 07, 2022 10:33 am
Is there a way to fix this? I would really appreciate the answer.
There is a way to do this when changing the Visibility item inside the property editor (View) instead. However, this option is off by default and you have to enable it, first:
* Open the parameter editor (Tools > Edit parameter)
* Navigate to BaseApp > Preferences > PropertyView
* Create a boolean key with the name AutoTransactionView and set its value to true
* Restart FreeCAD

For the tree view we can think about adding this option, too.
Thank you for your response!
The visibility toggle was already there, in the property view, even before I added the boolean key you have mentioned. [Ctrl-Z] still does not work. :(

https://drive.google.com/file/d/1ogDtsi ... sp=sharing
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Undo functionality in tree selection

Post by wmayer »

I added the boolean key you have mentioned. [Ctrl-Z] still does not work.
And you have restarted FreeCAD? It's important because this key is only checked at program start.

Try this example:
* Swtich to part wb
* Create a cube and select it
* In the View property editor select the item Visibility
* In the combo box select the item false
* In the Undo drop menu click this little arrow => you should see two entries
* Press Ctrl + Z

Does this work for you?
sirvinskasp
Posts: 6
Joined: Fri Oct 07, 2022 9:56 am

Re: Undo functionality in tree selection

Post by sirvinskasp »

wmayer wrote: Fri Oct 07, 2022 12:12 pm Does this work for you?
Yes, it does! It's quite weird though:
If I use [space], which changes the value to true/false - ctrl+z does not work.
If I change the value manually from the properties view - ctrl-z works.

Now it seems like a bug.

Thanks for such quick answers!
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Undo functionality in tree selection

Post by onekk »

sirvinskasp wrote: Fri Oct 07, 2022 1:33 pm ...
Now it seems like a bug.

As usual, it is not a bug, it's a the way FreeCAD (FC for short) will work, probably some actions are not added to the "undo stack".

@wmayer that is one of the lead developer, has answered you,:
wmayer wrote: Fri Oct 07, 2022 10:33 am For the tree view we can think about adding this option, too.
Probably something will happen in future.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
wmayer
Founder
Posts: 20307
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Undo functionality in tree selection

Post by wmayer »

If I use [space], which changes the value to true/false - ctrl+z does not work.
If I change the value manually from the properties view - ctrl-z works.
Doing it with property editor is a workaround.
Now it seems like a bug.
It's a missing feature. I will implement it shortly.
sirvinskasp
Posts: 6
Joined: Fri Oct 07, 2022 9:56 am

Re: Undo functionality in tree selection

Post by sirvinskasp »

wmayer wrote: Fri Oct 07, 2022 3:00 pm It's a missing feature. I will implement it shortly.
Wow, thanks! I will wait patiently.
I was already busy creating a workaround using macros. No success unfortunately.
Post Reply