On Wed, Jun 20, 2012 at 11:27 AM, Terry Brown <[email protected]> wrote:
> Edward - this is deja vu, but when copying / moving from c1 to c2, > ending the code with c1.bringToFront() doesn't prevent c2 from being > the top tab after control returns to Leo. The previous case was c1 > trying to keep focus, instead of losing it to the buried c2, but it's a > similar situation. The proper, and easy, place to fix this is in c.outerUpdate. This is the method that gets called at the end of each command to handle redrawing, refocusing, recoloring, etc. It's easy to see what the problem is: c.bringToFront() just sets a flag, c.requestBringToFront, that causes c.outerUpdate to call c.frame.bringToFront(). But this assumes that the commander, c, calling c.bringToFront(), is the commander that the caller wants to be at the front. Instead, c.bringToFront should have an optional c param, specifying the desired commander that is to be brought to the front. c.bringToFront(c2) should set c.requestBringToFront to c2 and c.outerUpdate should call c.requestBringToFront.frame.bringToFront() I'll make the change immediately. You can then call c.bringToFront(c2), where c2 is the desired new commander. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
