OpenBoard-org / OpenBoard

OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.
https://openboard.ch/
GNU General Public License v3.0
2.24k stars 412 forks source link

[Bug] Switching pages moves view by slight amount #1009

Open Vekhir opened 2 weeks ago

Vekhir commented 2 weeks ago

Describe the bug

Switching between pages shifts the view up (the objects and background look like they are moving down). It's only by a small amount (a pixel or so per switch), so could be rounding error which accumulates.

To Reproduce

  1. Open OpenBoard
  2. Create second page
  3. Draw a line on each page or simply turn background on
  4. Switch between the pages repeatedly by clicking on their thumbnails

Expected behavior

The view doesn't change.

Actual behavior

The objects "move down" - since the background moves too, I guess the view is moving up, though I don't know how that looks in the code.

Context

Additional context

OS: Arch Linux Kernel: Linux 6.9.3-arch1-1

a) number and resolution of monitors : 2 x 1920x1080, b) number and resolution of monitors: 1 x 1920x1080

letsfindaway commented 2 weeks ago

Hmm, I cannot reproduce this here. Even after 20 or so page switches the background or an object have not moved a single pixel. I tried page switching with the thumbnails, with the toolbar, with the arrow keys or the PgUp/Down keys, but in no case I could observe this effect.

I also tried it with one or two monitors - no difference.

Vekhir commented 2 weeks ago

Thanks, of course I only tested with Qt6... Qt5 is fine, so I guess that's what you used?

I actually found a simpler reproducer, just clicking on the thumbnail already moves the view/objects/background.

Qt 6.7.1 is affected.

letsfindaway commented 2 weeks ago

Yes, I used Qt 5.15.8 for testing. But I now tested it also with Qt 6.4.2 and did not observe this move.

Does this occur only when you switch pages with the thumbnails or also if you use other methods like toolbar icon or keyboard? This could probably help to identify the code path causing that.

Vekhir commented 2 weeks ago

Afaict, it happens always when switching.

I also observed that it happens when clicking on the thumbnail, without any other pages present.

Another interesting observation I just made: Every object, drawing, etc. is moved - except the magnifier application. The ruler, triangle, clock, etc. move, but the magnifier does not. Perhaps this will put us on the right path.