r24815 by jghali - #16726: Duplicate paragraph among linked text frames
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 21 19:14:46 UTC 2022
Author: jghali
Date: Fri Jan 21 19:14:46 2022
New Revision: 24815
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24815
Log:
#16726: Duplicate paragraph among linked text frames
Modified:
trunk/Scribus/scribus/text/textlayout.cpp
Modified: trunk/Scribus/scribus/text/textlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24815&path=/trunk/Scribus/scribus/text/textlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.cpp (original)
+++ trunk/Scribus/scribus/text/textlayout.cpp Fri Jan 21 19:14:46 2022
@@ -103,12 +103,20 @@
if (boxes.isEmpty())
return;
- GroupBox* column = dynamic_cast<GroupBox*>(boxes.last());
- assert(column);
-
- int lineCount = column->boxes().count();
- if (lineCount > 0)
- column->removeBox(lineCount - 1);
+ int columnIndex = boxes.size() - 1;
+ while (columnIndex >= 0)
+ {
+ GroupBox* column = dynamic_cast<GroupBox*>(boxes[columnIndex]);
+ assert(column);
+
+ int lineCount = column->boxes().count();
+ if (lineCount > 0)
+ {
+ column->removeBox(lineCount - 1);
+ break;
+ }
+ --columnIndex;
+ }
}
void TextLayout::render(ScreenPainter *p, ITextContext *ctx) const
More information about the scribus-commit
mailing list