From 655fb69b42892807d8fe7ea6243c30dca9c52ee1 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Thu, 4 Nov 2021 09:21:41 +0000 Subject: [PATCH] Overwiew Layout fixup .. the renumbering of columns removed empty columns. This was not desirable since in some instances where spanning tiles are used the user may have deliberately done this. .. thanks to Alan Benstead at the forums for an example chart to test this fix against. --- src/Gui/ChartSpace.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Gui/ChartSpace.cpp b/src/Gui/ChartSpace.cpp index 5933c3a49..16fb75bbe 100644 --- a/src/Gui/ChartSpace.cpp +++ b/src/Gui/ChartSpace.cpp @@ -397,6 +397,9 @@ QList ChartSpace::layoutItems() QList items; foreach(ChartSpaceItem *item, this->items) items << LayoutChartSpaceItem(item); + // nothing to layout + if (items.count() == 0) return items; + //fprintf(stderr, "BEFORE: "); //foreach(LayoutChartSpaceItem item, items) fprintf(stderr, "%d:%d ", item.column, item.order); //fprintf(stderr, "\n"); fflush(stderr); @@ -422,13 +425,8 @@ repeatlayout: // can get out of whack when last entry // from column 0 is dragged across to the right // bit of a hack but easier to fix here - int nextcol=-1; - int lastcol=-99; - for(int i=0; i