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

Ian Simpson ian.kdedev at yahoo.com
Thu Jan 24 18:12:47 UTC 2013


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

(Updated Jan. 24, 2013, 6:12 p.m.)


Review request for KDE Games.


Description (updated)
-------

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 (updated)
-----

  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/20130124/68771d24/attachment.html>


More information about the kde-games-devel mailing list