Menu

#3209 Keyboard shortcuts for unit orders processed while editing trade route.

Fixed_0.12.0
closed-fixed
nobody
None
5
2022-05-01
2020-09-23
No

While In Edit Trade Route dialog, shortcuts like F, Z, H etc. are still processed, and respective orders are issued to the currently selected unit, whatever it is. This happens even when you type trade route name in the text box.

Discussion

  • Mike Pope

    Mike Pope - 2021-01-30

    The trade route panel/s are a bit of a mess, and I have been working on fixing them. However I am not seeing this problem with the shortcut keys --- I just made a trade route called FZH without difficulty. What OS/Java version/FreeCol version are you using?

     
    • forgesourcer

      forgesourcer - 2021-01-30

      FreeCol game version: git-20200715 (Revision: 8baaf7a)
      FreeCol protocol version: 0.1.6

      Java vendor: Oracle Corporation
      Java version: 1.8.0_261
      Java WM name: Java HotSpot(TM) 64-Bit Server VM
      Java WM vendor: Oracle Corporation
      Java WM version: 25.261-b12

      OS name: Windows 7
      OS architecture: amd64
      OS version: 6.1

      Try selecting a wagon train, then press A, Edit trade route, and press F or H.

       
      • Mike Pope

        Mike Pope - 2021-01-30

        "New Trade RouteFH" is not the best name for a trade route, but it works for me.

        Sad suspicion: Windows 7 weirdness.

         
  • Calebrw

    Calebrw - 2021-02-01

    Either commit [ceabcf] or the one before introduced a new bug where it seems you can no longer remove items from the Trade route at a given stop -- just add them.

     

    Related

    Commit: [ceabcf]

    • Mike Pope

      Mike Pope - 2021-02-01

      There are several things wrong ATM. Work in progress.

      The shortcuts issue is sounding like a focus problem, in that something in windows/java/whatever is stealing the focus from the TradeRouteInputPanel and giving it back to the main map. What I see is that only explicitly enabled keys are active (e.g. Delete), which is what looks like was intended, if slightly lame (ESC should probably work too for example).

       
  • Calebrw

    Calebrw - 2021-02-01

    Also, I have had what the OP describes and I'm on Windows 10. It has something to do with renaming the trade route, but perhaps not clicking in the text box?

    FreeCol game version: 0.11.6 (Revision: ceabcf470)
    FreeCol protocol version: 0.1.6

    Java vendor: Oracle Corporation
    Java version: 1.8.0_181
    Java WM name: Java HotSpot(TM) 64-Bit Server VM
    Java WM vendor: Oracle Corporation
    Java WM version: 25.181-b13

    OS name: Windows 10
    OS architecture: amd64
    OS version: 10.0

     
    • forgesourcer

      forgesourcer - 2021-02-01

      I have experienced this anywhere in the Edit Trade Route dialog, not just in the name text box.

       

      Last edit: forgesourcer 2021-02-01
  • William Astle

    William Astle - 2021-02-12

    As a point of information, I also see the behaviour on Linux so it doesn't seem to be platform specific weirdness.

     
    • Mike Pope

      Mike Pope - 2021-02-12

      Good to know, albeit I am still not seeing it. Any chance you can bisect the problem?

       
      • William Astle

        William Astle - 2021-02-12

        I'm not especially competent with git but I gave it a shot. It was not nearly so useful as one might hope. I ran into too many problems with games simply not starting (new game just gives blank window) which makes testing impossible.

        The first commit where a game can actually starts is 2a92daea31ee10ac8c1e39663c107dddeaf7ea93 and the problem manifests there. So the problem would seem to have existed before that particular commit but I can't narrow it down further due to being unable to actually test revisions prior to that one.

        My testing process has been to do a clean build, run the program, press "A" to add a trade route to the starting ship, creating a new one, then try to edit the name (to make sure something in that panel is focused, the text box in this case). Pressing D then asks if I want to disband the ship as well as adding it to the name box.

        In case it matters, this is on Linux Mint 20.1 with openjdk version 11.0.10.

         
  • Jazz Rexl

    Jazz Rexl - 2021-12-13

    I reworked the whole TradeRouteInputPanel, please have a look at the patch.

    The issue with the hot keys is simply because the panel is not "modal" and all Actions still receive there mnemonic shortcuts.

    I implemented a solution for that as well (see also my freecol-developer mail).

    If you guys accept the patch (or parts) we probably can close this BR.

     
  • Mike Pope

    Mike Pope - 2022-04-23
    • status: open --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2022-04-23

    Reported fixed by Stian. Setting to Pending.

     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Group: Fixed_trunk --> Fixed_0.12.0
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB