Selections with multiple documents, how to refresh focus?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3436
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Selections with multiple documents, how to refresh focus?

Post by freedman »

I'm running an "itemClicked.connect" and it doesn't seem to be aware as I change to multiple documents in the tree. I tried "doc = App.ActiveDocument" but that did not do it.
What statement refocuses the change to a new selected/highlighted document in the tree?
Thanks
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Selections with multiple documents, how to refresh focus?

Post by openBrain »

I can't understand exactly what you're trying to achieve, but wouldn't a SelectionObserver be the solution ?
freedman
Veteran
Posts: 3436
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Selections with multiple documents, how to refresh focus?

Post by freedman »

I didn't quite get document activation, now I get it. Thanks openbrain.
Post Reply