Skip to content
Commit 376c17a2 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Fix initial logging errors from KGameRenderer due to too large pixmaps

KMinesScene in the constructor starts off with an empty scene size of
0x0. When the MineFieldItem is added then as first item, the scene
is enlarged to fit the item.
Due to MineFieldItem having had at that time uninitialized fields which
though are used for calculating the boundingRect, this results by chance
in extreme sizes like QSize(1941359222, 1217526246).

Using some dummy init values which yields small sizes solves that.

Better would be to rework when the pixmap for the background brush is
actually fetched first, i.e. when we have real window/scene sizes and
are shown.
The current implementation is consistent though across tkdegames, so
that improvement should be done in a follow-up work for all.

(cherry picked from commit a2f7be5c)
parent c7c519ae
Pipeline #534465 passed with stage
in 1 minute
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment