[Kde-games-devel] Review Request 108567: Fix scene/view corruption on window resize

Ian Simpson ian.kdedev at yahoo.com
Sun Mar 24 12:17:16 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108567/
-----------------------------------------------------------

(Updated March 24, 2013, 12:17 p.m.)


Status
------

This change has been discarded.


Review request for KDE Games.


Description
-------

Scene/view was corrupted after resizing the window. Removed tiles were being drawn at their original size.

Appears fixed by calling addItemsFromBoardLayout() in order to recreate the scene.

EDIT:

So now I'm thinking that it's a problem with the scene not being notified when the items bounding rects change.

Seems to happen only when the window is made smaller. You can start with a small window and gradually make it larger and it's OK. When it's made smaller the deleted tiles will start to be drawn.

Added a new patch that iterates through the items calling prepareGeometryChange() before reloading the tileset.


Diffs
-----

  GameItem.h cdf998a 
  GameItem.cpp 2523b08 
  GameView.cpp d652ed6 

Diff: http://git.reviewboard.kde.org/r/108567/diff/


Testing
-------

Tried some different layouts at different states of play, and the gameover replay animation.


Thanks,

Ian Simpson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20130324/b8c4e23b/attachment.html>


More information about the kde-games-devel mailing list