Stamp brush glitch when using middle mouse to drag canvas

I’ve had this issue for a while but never had the time to make a post about it. I’ve also tried searching the forum to see if anyone else have reported this but haven’t been able to find any. I’ve marked this as a bug as I assume it’s a bug with the software itself.

To quickly and more efficiently move around the canvas/map while working with the stamp brush, I use the middle mouse button to drag the canvas to a new location. This has always, for as long as I’ve been using Tiled, caused the blue square/selected tile of the brush to get stuck on the map and I have to go over the area with the mouse to make it go away. It gets a bit tedious after a while.

I wanted to report this in case there’s a possibility it could be fixed.

I’ve uploaded a .gif of this behaviour to this post.

tiled-stamp-brush-glitch-when-middle-mouse-drag

This is a long-standing known issue (GitHub: #174) caused by the redraw region being incorrectly calculated by Qt. Because it is a Qt issue, it can’t be fixed in Tiled except by redrawing the entire screen every time, which would be terrible for performance. This is unfortunately something Tiled users have had to live with for years ):

You can avoid this issue by enabling hardware acceleration, which will always redraw the whole screen, but with decent performance due to the hardware acceleration. However, this has other downsides, and outright doesn’t work on some systems (if this happens, you can force it to disable OpenGL by starting it via the command line with the --disable-opengl parameter).

If hardware acceleration isn’t a suitable option for you, you can remove the artefacts by forcing a manual complete redraw yourself by zooming in/out, which might be less tedious than moving your cursor around the affected area. I often do this with Ctrl+mouse wheel at the end of panning operations, flick up and then back down.

1 Like

Ah, I see. That’s unfortunate, but will test using hardware acceleration as mentioned. Should have did a search on github as well to find it. Thank you for taking your time linking it and explaining where the issue stems from! :blush: