clear the cells before relayouting the items

when items are moved around due to screen resolution change,
no cell should be considered as taken, because all items will be moved,
otherwise items will be moved and resized in unexpected ways to make
room for "ghost" items.
Clear the bookkeeping before doing the move

BUG:413019
wilder-5.17
Marco Martin 6 years ago
parent d1519026e6
commit 0e25e9ad10
  1. 2
      components/containmentlayoutmanager/gridlayoutmanager.cpp

@ -108,6 +108,8 @@ inline void maintainItemEdgeAlignment(ItemContainer *item, const QRectF &newRect
void GridLayoutManager::layoutGeometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
{
m_grid.clear();
m_pointsForItem.clear();
for (auto *item : layout()->childItems()) {
// Stash the old config
//m_parsedConfig[item->key()] = {item->x(), item->y(), item->width(), item->height(), item->rotation()};

Loading…
Cancel
Save