Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can still click on buy button in vehicle selection window even if no vehicle is selected #6599

Closed
DorpsGek opened this issue Aug 10, 2017 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@DorpsGek
Copy link
Member

james1101 opened the ticket and wrote:

To Reproduce:

  1. Open a depot window and click the 'New Vehicles' button.
  2. Deselect the vehicle by doing the following:
    3. Select a vehicle. (Example: a locomotive without any capacity)
    4. Filter the list such that the selected vehicle disappears. (Example: Show only vehicles that can carry .)
  3. Click the 'Buy Vehicle' button in the vehicle selection window.
    -> Nothing happens. The button is not greyed out, but it does nothing. Please fix this.

Attachments

Reported version: 1.7.1
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/6599
@DorpsGek
Copy link
Member Author

andythenorth wrote:

Confirmed - can reproduce this using steps described.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6599#comment14506

@DorpsGek
Copy link
Member Author

adf88 wrote:

I have something for this, and more.

0-disable-build-button-if-no-engine-selected.diff
Fixes the issue (disables/enables the button when needed).

1-select-first-available-rail-engine-to-buy.diff
Enable auto-selecting first available engine also in train lists (currently, when the selected train is being filtered out, nothing gets selected). Also remove some duplicated code.

2-use-gui-sorlists-for-buildvehgui-engines-sorting.diff
Remove duplicated code and use GUIList class for sorting engine lists.

3-use-gui-sorlists-for-buildvehgui-engines-filtering.diff
Remove duplicated code and use GUIList class for filtering engine lists.

4-uncache-buildvehgui-listviewmode.diff
Remove useless caching of "list-view mode" in BuildVehicleWindow class.

5-uncache-buildvehgui-cargofilterarray.diff
Remove useless caching of cargoes and cargo names in BuildVehicleWindow class.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6599#comment14574

@DorpsGek
Copy link
Member Author

adf88 wrote:

Sorry, a mistake got in. I'm uploading a fixed patch # 3. Now I tried harder at testing ;)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6599#comment14582

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@TrueBrain TrueBrain added patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay good first issue Good for newcomers bug Something isn't working and removed bug from FlySpray labels Apr 10, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
@andythenorth andythenorth added the stale Stale issues label Jan 5, 2019
@andythenorth
Copy link
Contributor

I can't get the patch to apply to master (as of 12th Jan 2019). Issue still looks valid.

@LordAro LordAro removed the stale Stale issues label Jan 12, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 12, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 12, 2019
@andythenorth andythenorth removed flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Jan 12, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
Eddi-z added a commit to Eddi-z/OpenTTD that referenced this issue Jan 27, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this issue Feb 10, 2019
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this issue Mar 11, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
5 participants