On Thu, 31 Mar 2016 14:06:55 -0700 (PDT) "Edward K. Ream" <[email protected]> wrote:
> Another Engineering Notebook post. Feel free to ignore unless you > are Terry or > Peter Mills. > > While merging VR and VR2, it has become clear that the present > approach to having multiple VR panes has *no chance* of working. I think the present approach is the result of inadvertent trampling of earlier states where multiple VRs were possible, but the approach was always delicate and something more robust like you describe is needed. Although it might be a bit vague, maybe the non-mouse non-context-menu commands (i.e. keyboard commands) addressing VRs could target the last VR selected, rather than insist a VR pane is selected when they're issued. The question of which VR doesn't arise with in-pane gui controls as seen in VR2. Perhaps we need a cycle-focus command that cycles through all panes, not just tree/body/log, with some graphical indicator of the moving focus, seeing it's not clear in some panes in some themes. Cheers -Terry > Indeed, there is a global *controllers *dict, but the keys are > Commanders. This means that there can not be more than one VR pane > per Commander. Yes, we could imagine that values in the controllers > dict would be *lists* of VR controllers, but that is not enough. > > Instead, we must have a way of associating VR controllers with > *panes*. Then, when an event is received, we must get the *pane* (not > just the controller). > > At present, most commands contain code such as this: > > vr = c.frame.top.findChild( > QtWidgets.QWidget, vr3_pane_name) > > I think now you can see the problem. This searches the *entire > outline* for a match. Instead, we must associate vr (a VR controller) > with the presently active Leo pane. It had better be a VR pane ;-) > It's not rocket science, but the global controllers dict must go (or > be rethought), and all the code that uses it must be revised. > > EKR > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
