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.
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
Try selecting a wagon train, then press A, Edit trade route, and press F or H.
"New Trade RouteFH" is not the best name for a trade route, but it works for me.
Sad suspicion: Windows 7 weirdness.
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]
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).
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
I have experienced this anywhere in the Edit Trade Route dialog, not just in the name text box.
Last edit: forgesourcer 2021-02-01
As a point of information, I also see the behaviour on Linux so it doesn't seem to be platform specific weirdness.
Good to know, albeit I am still not seeing it. Any chance you can bisect the problem?
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.
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.
Reported fixed by Stian. Setting to Pending.