On Tue, Sep 8, 2009 at 5:38 PM, Adrian Buehlmann<adr...@cadifra.com> wrote: > Using 7fda75c1944e, if I put the focus into the Qnew field > in the commit dialog and start typing, each character I enter > overwrites the one I typed just before. > > Bisecting leads to: > ''' > # HG changeset patch > # User Steve Borho <st...@borho.org> > # Date 1251987292 18000 > # Node ID f5849818381af037feef3797b34bf3ab905822f6 > # Parent 4ff888964b7df1e8d91345b44eebb14d55745dc9 > status: move repo.status() call into a separate function > > Prep work for making repo.status threaded and adding a progress bar > ''' > > That change seems to be the first one introducing problems with > the Qnew field. > > > The later change: > ''' > # HG changeset patch > # User Yuki KODAMA <endflow....@gmail.com> > # Date 1252123585 -32400 > # Node ID 5cdaca44c6aa89243188cb68df5448614eaace27 > # Parent de8a545808cadd373013b4684ad2acb6e8fdb1e2 > commit: fix error when inputting MQ patch name for QNew > > When calling 'reload_status', QNew textfield loses the focus. > So it has to grab the focus again after reloading. > ''' > > seems to have tried to fix something there, but failed > at doing so -- as the behavior of 7fda75c1944e demonstrates. > > Yuki, Steve?
Yuki and I both made changes on the same day for that problem. I think mine were rebased on top of his. Neither fixed it entirely, There, I just pushed a fix for it. It's still a bit kludgy but for most people it will just work. * user presses key in qnew entry window * commit tool enters qnew mode and starts an async refresh (to only show working diffs) * Yuki added code here to recover focus to the qnew entry. I'm not sure this is necessary, but is harmless if not. * when repo.status() thread finishes, the tool refreshes the file list and diff pane, leaving focus in the file list * in commit:refresh_complete(), we check for qnew mode and reset the focus back to the qnew entry and move the cursor to the end of the text (Yuki's idea, which I neglected to do in my initial fix). The side-effect here is that the qnew entry always gets focus after a refresh when you are in qnew mode. And if repo.status() takes a long time, and the user moves the cursor somewhere, it will bounce back when status completes. -- Steve Borho ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop