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

Comments

@DorpsGek
Copy link

@DorpsGek DorpsGek commented Aug 10, 2017

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
Author

@DorpsGek DorpsGek commented Aug 12, 2017

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
Author

@DorpsGek DorpsGek commented Aug 19, 2017

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
Author

@DorpsGek DorpsGek commented Aug 19, 2017

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
@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Jan 12, 2019

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

@LordAro LordAro removed the stale 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
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 nielsmh closed this in 57734fd Feb 14, 2019
nielsmh added a commit to nielsmh/OpenTTD that referenced this issue Mar 11, 2019
douiwby added 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.