On 4/4/2011 5:05 PM, Jerry Jacobs wrote: > On 4/4/11 10:43 PM, Wayne Stambaugh wrote: >> On 4/4/2011 3:51 PM, Jerry Jacobs wrote: >>> On 4/4/11 9:41 PM, jean-pierre charras wrote: >>>> >>>> Jerry, >>>> Your last change in rev 2945 in file: >>>> common/hotkeys_basic.cpp >>>> breaks Kicad. >>>> >>>> The reason is when a key is added in a menu, with a \t before it, it >>>> become a shortcut. >>>> Therefore type is key is exactly equivalent to click on this menu, and >>>> this key is no more sent to the kicad key handler.. >>> >>> I don't know for sure, but for me on OS X all the Placement hotkeys which I >>> tested (in EESchema) works as expected. With wxWidgets 2.9.2 svn. And don't >>> break the hotkey internals, correct me if I'm wrong. >> >> Jerry, >> >> It is important understand that hot keys are not the same as menu or tool bar >> short cuts. The menu and tool bar commands require an extra left mouse click >> to create the object associated with the current tool. Hot keys on the other >> hand, create the object immediately at the current cursor position. While >> your >> change may work, it had to change the behavior of the hot key. Your change >> would have remapped the hot key to the equivalent place menu command. >> >>> >>>> This break Kicad, because many hotkeys does not the same thing as you >>>> are click on menus. >>>> Mainly because hot keys use current mouse cursor position (start a wire, >>>> zoom, ...) >>>> and obviously this is not possible when clicking on a menu. >>>> This is true for menus in frame menu bar, not pop up menus, because they >>>> are not active. >>>> So in many cases keys added in menus in the menu bar are only comments, >>>> not shortcuts. >>> >>> This "bad" comments "break" the Mac UI policy and are a bit ugly compared to >>> the defaults. >> >> I do agree with you assessment about the comments. Not as much from a UI >> policy standpoint as from a behavior standpoint. Pressing the W key to begin >> drawing a wire is not the same as selecting the wire tool and left clicking >> to >> begin drawing a wire. They are not the same thing so adding the comment is >> confusing. >> >>> >>>> Please, unless you known (with wxWidgets) how to see the difference >>>> between click on a menu >>>> and click on the corresponding hotkey, >>>> (I do not know how to do that, and if this is possible, because the same >>>> event is sent, >>>> perhaps try to use wxEvent::GetEventType() to do that, but this needs a >>>> lot of changes), >>>> go back to the previous version of common/hotkeys_basic.cpp. >>>> Aesthetic reason to this change is not a good reason, if this change >>>> breaks the previous behavior. >>>> Currently, most of hotkeys are not working properly. >>> >>> It is no problem to revert back to the previous version of this file. >> >> If that is what you are going to do, please let me know as I have a commit >> ready to submit. I hold off until I hear otherwise. > > I would love to uncommit the change on common/hotkeys_basic.cpp but still the > devil hides behind Bazaar. @Wayne, maybe you could revert this file to the > state of rev 2944 which doesn't break. Then the commits can carry on. > > Still I'm trying to learn the bzr way of doing SCM, sorry guys!
The command you are looking for is: bzr revert -r VERSION [FILE] the command to revert hotkeys_basic.cpp to it's previous version would be: bzr revert -r 2861 common/hotkeys_basic.cpp. I'll go ahead and revert it my next commit. Wayne > >> Wayne > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

