Skip to content

Commit

Permalink
Another ChartSpace spanning tile fixup
Browse files Browse the repository at this point in the history
.. if a tile moves because it clashes with a spanning tile we need
   to repeat the process in case it clashes with another after it
   has been moved.

.. previously we moved on the first clash, but ignored any others.
  • Loading branch information
liversedge committed Aug 19, 2021
1 parent ba3c0bf commit efba58b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Gui/ChartSpace.cpp
Expand Up @@ -477,9 +477,12 @@ ChartSpace::updateGeometry()
int add = 0; //XXX PERFORMANCE ISSSE XXX (state == DRAG) ? (ROWHEIGHT/2) : 0;

// check we don't overlap with any spanning items in earlier columns etc
foreach(QRectF spanner, spanners) {
if (spanner.intersects(QRect(tx,ty,twidth,theight+SPACING)))
ty = spanner.bottomLeft().y() + SPACING;
again:
for(int j=0; j< spanners.count(); j++) {
if (spanners[j].intersects(QRect(tx,ty,twidth,theight+SPACING))) {
ty = spanners[j].bottomLeft().y() + SPACING;
goto again;
}
}

// for setting the scene rectangle - but ignore a ChartSpaceItem if we are dragging it
Expand Down

0 comments on commit efba58b

Please sign in to comment.