Menu

#3259 When creating multi-stop trade route, UI glitch interferes with loading one resource at multiple stops

Fixed_1.0.0
closed-fixed
None
5
2023-01-03
2022-05-08
No

Using nightly from commit a71a0b4.

I go to create a new trade route with three stops. I add three cities first before trying to figure out cargo. I add Cotton to the carrier at New Amsterdam. Cotton becomes no longer available to add again at New Amsterdam (makes sense).

Then I click on Fort Orange. But Cotton doesn't reappear in the Goods section, so I can't load cotton in Fort Orange.

Workaround: Click "OK", then go back in to edit the trade route again. Now Cotton becomes available again in the Goods section in both New Amsterdam and Fort Orange.

2 Attachments

Discussion

  • zp325

    zp325 - 2022-08-31

    I also got annoyed by this and just tried to understand the code.
    A comment in the code says, the panel with all goods "should not change under drag/drop". And that is how it would make sense. E.g. to load more of 100 of one good it seems you have to add the good twice.
    So I tried to fix this. There is no function that explicitly removes the goods.
    My guess is, the reason why the symbol disappears is that the UI component of the symbol needs to be cloned when it is added to the panel for the stop (line 191 in TradeRouteInputPanel.java). But I don't do much Java and don't know right now how to do this. Maybe someone else does?

     

    Last edit: zp325 2022-08-31
  • Stian Grenborgen

    • assigned_to: Stian Grenborgen
     
  • Stian Grenborgen

    I will look into it.

     
  • Stian Grenborgen

    @zp325: This is a bit of work to fix since the code assumes that the goods type can only be once in the cargo list. For example, it's possible to select several stops and add/remove a goods type for all of them at the same time. I will have to fix this when I have more time available than now.

    @nanobot: A better workaround for your issue is selecting all the stops that should have a given goods type before you add it. The goods type will then be added to all the stops.

     
    👍
    1
  • Stian Grenborgen

    • status: open --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Stian Grenborgen

    The issue should now be fixed in our development build.

     
  • Stian Grenborgen

    • status: pending-fixed --> closed-fixed
    • Group: Fixed_trunk --> Fixed_1.0.0
     

Log in to post a comment.

MongoDB Logo MongoDB