diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-06-16 08:05:44 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-06-16 08:50:23 (GMT) |
commit | 183abff6ffcb020b8f0c4041cc82bba0d3b03863 (patch) | |
tree | 7492fe295fdc966b72ba27f3c68ef5d7716e2801 /src/gui/graphicsview/qgridlayoutengine_p.h | |
parent | 17fbbdd3a081a66e1d2b26db7935111c49cea75e (diff) | |
download | Qt-183abff6ffcb020b8f0c4041cc82bba0d3b03863.zip Qt-183abff6ffcb020b8f0c4041cc82bba0d3b03863.tar.gz Qt-183abff6ffcb020b8f0c4041cc82bba0d3b03863.tar.bz2 |
Fixed problem with wrong size hints when items were removed.
The reason was that the row/column count was not updated after an item
was removed. (Note that qgraphicslinearlayout already did this, so we
just follow the same pattern, except that the code for
QGraphicsGridLayout is a bit more complex...
Task-number: QTBUG-10314
Reviewed-by: Alexis Menard
Diffstat (limited to 'src/gui/graphicsview/qgridlayoutengine_p.h')
-rw-r--r-- | src/gui/graphicsview/qgridlayoutengine_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index cbf704e..9ac9a8e 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -363,8 +363,8 @@ public: QGridLayoutItem *itemAt(int row, int column, Qt::Orientation orientation = Qt::Vertical) const; inline void insertRow(int row, Qt::Orientation orientation = Qt::Vertical) { insertOrRemoveRows(row, +1, orientation); } - inline void removeRow(int row, Qt::Orientation orientation = Qt::Vertical) - { insertOrRemoveRows(row, -1, orientation); } + inline void removeRows(int row, int count, Qt::Orientation orientation) + { insertOrRemoveRows(row, -count, orientation); } void invalidate(); void setGeometries(const QLayoutStyleInfo &styleInfo, const QRectF &contentsGeometry); |