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