GUI new addition, toggle operation with flexibility (concept)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

GUI new addition, toggle operation with flexibility (concept)

Post by freedman »

If I were a main GUI developer and found that in the tree any icon that is selected can only be selected once (from a user standpoint), click on the same icon as many times as you like and nothing changes, every icon in the tree. Well, that's a huge opportunity to exploit by detecting a toggle type click or what I will call a reclick. :)
So the key to all of the following operations is the reclick i.e. my operation triggers on clicking the same icon twice, not a double click.
I'm going to throw out some ideas and maybe they will stick. I made a simulated pop-up (pic) that comes up when I reclick the document icon. The Toggle pop-up is a set of options that allow you to select one option (or none) from each category, the selection targets what will happen when you reclick that kind of icon in the tree from now on. The options in the Toggle pop-up are all made up for now but this concept is very configurable.

So, a walk thru. I want to configure what happens when I reclick a sketch icon. I reclick the document icon and the pop-up shows, I check the Hide dependent checkbox and close the pop-up. Now, any time I reclick a sketch icon the app will perform a Hide dependent.

Some of the ideas I had came from this post.
https://forum.freecadweb.org/viewtopic.php?f=8&t=58962
I used the toggle operation as a way to change visibility of unselected features. I'm still working on that macro.
Attachments
Toggle_pic.JPG
Toggle_pic.JPG (47.23 KiB) Viewed 1348 times
Post Reply