Kunda1 wrote: ↑Sun Oct 25, 2020 2:56 pm
Edit: this issue is related to 3498
I actually started from the discussion of 3498
(@Kunda1, you ended up with a wiki link...) and was poking around at these ideas tonight. I took a simple (probably stopgap) approach: I've implemented a single additional Preferences tab that looks like this:
You can select workbenches there and tell them to load. Which would be great, except I can't figure out how to reload the Preferences dialog from inside
the preferences dialog! So you have to manually close it and open it again, which is stupid. So if anyone has any suggestion for how to do that, it would be much appreciated.
I have mixed feelings about this approach. On the one hand, it is minimally invasive. It doesn't require workbench authors to do anything, doesn't mess around with any other FreeCAD code, and simply explains to users what they are seeing. It also doesn't clutter up the preferences dialog with a bunch of workbenches you might not ever use. (OK, yes, I need to make an Icon for its group, it's pretty ugly right now!)
I think in an ideal world preferences would be something that a Workbench could deliver on-demand without loading the whole bench. Then when the preferences dialog launches the first time we could just iterate over all the workbenches that are registered but not loaded yet and ask them to insert their pages. We could even get really "lazy" and actually only ask the workbenches to pre-register the names of their groups, pages, and group icons. Then we could ask the bench to deliver the actual page content only if the user actually clicks on it. But that might be a bit overkill, I don't know if it's really necessary to be that stingy with resource usage, as long as we can implement the preferences without loading the entire workbench.