OpenTTD icon indicating copy to clipboard operation
OpenTTD copied to clipboard

[Bug]: Object Selection UI - resizing when switching between certain types of objects

Open andythenorth opened this issue 2 years ago • 0 comments

Version of OpenTTD

f279fc57721d558c92a476f80ade51f6d63cbd74

Expected result

Object Selection UI should not resize when selecting different objects.

https://user-images.githubusercontent.com/1780327/189519379-e6e19ff8-3bb4-4035-bf21-abd288fc07f7.mov

Actual result

Object Selection UI resizes when selecting different objects.

Steps to reproduce

Using attached FIRS (this is for repro only, the issue is not unique to FIRS).

  1. add FIRS to grf config
  2. select 'Steeltown' economy and 'FIRS Landscaping Objects: On'
  3. start game
  4. open Object Selection UI
  5. choose 'Basic Oxygen Furnace'
  6. make window wide enough to span at least 2 columns of objects
  7. select last object, then select first object
  8. observe window resize
  9. repeat for different window sizes

Any multi-column layout will reduce number of columns by 1 when switching from last object to first. Separately, in many cases, the window will slightly resize slightly when switching between objects. This will also occur with other object grfs and combinations of objects etc, but may be a separate issue.

firs.grf.zip

The repro above is reliable, but the issue doesn't manifest universally for object grfs. Many object grfs fill all 4 views, and that may or not be significant.

andythenorth avatar Sep 11 '22 09:09 andythenorth