Fix a crash when undoing form layout
authorJarek Kobus <jkobus@trolltech.com>
Tue, 1 Feb 2011 12:15:28 +0000 (13:15 +0100)
committerJarek Kobus <jkobus@trolltech.com>
Tue, 1 Feb 2011 12:15:28 +0000 (13:15 +0100)
commit0e456bf74dfea10c0f5c164eb5a920e4661a91b2
treed2d2b7aeb5ab477d5749dc0cdc234723d3bd01ed
parent84b81d47829d56cbd5568034161bf25898ab0824
Fix a crash when undoing form layout

In a rare case when breaking a layout might
make widgets overlap, the internal heuristic
failed when recreating an original layout during undo.
Some widgets were removed from the grid.
The patch fixes this heuristic (makes sure
we don't remove other widgets). Creating
a form layout from overlapping widgets works
better now.

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Task-number: QTCREATORBUG-3616
tools/designer/src/lib/shared/layout.cpp
tools/designer/src/lib/shared/qlayout_widget.cpp