longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
214 stars 39 forks source link

UWT table on Units view doesn't allow you to scroll down #2296

Closed jwrober closed 1 week ago

jwrober commented 1 month ago

Describe the bug If you have units waiting for UWT to expire and the list is bigger than the page, then you get a vertical scroll bar. If you try to scroll down, you can't. The game always drops you back to the top.

To Reproduce Steps to reproduce the behavior:

  1. Open a game with lots of units with UWT
  2. Click on Units View
  3. Try to scroll down to see the bottom one
  4. See error

Expected behavior Scroll bars work as expected.

Screenshots If applicable, add screenshots to help explain your problem.

Platform and version (please complete the following information):

Additional context Came up as part of a conversation with @hugomflavio

jwrober commented 1 month ago

Offending code starts here

https://github.com/longturn/freeciv21/blob/5612c6d86af6c0364f566f791a7ca863bf248cd0/client/views/view_units.cpp#L285

The QTimer updates every second and then repaints/updates the table. The purpose is to update the countdown timer in the table, but seems to have a deleterious effect with long lists.