r21697 by jghali - #14530: Text selection shortcut doesn't work anymore as reasonably expected
scribus-commit
scribus-commit at lists.scribus.net
Mon Jan 2 20:07:53 UTC 2017
Author: jghali
Date: Mon Jan 2 20:07:53 2017
New Revision: 21697
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21697
Log:
#14530: Text selection shortcut doesn't work anymore as reasonably expected
Modified:
trunk/Scribus/scribus/text/textlayout.cpp
Modified: trunk/Scribus/scribus/text/textlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21697&path=/trunk/Scribus/scribus/text/textlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.cpp (original)
+++ trunk/Scribus/scribus/text/textlayout.cpp Mon Jan 2 20:07:53 2017
@@ -259,12 +259,26 @@
int TextLayout::startOfFrame() const
{
- return m_box->firstChar();
+ QList<Box*>& boxes = m_box->boxes();
+ if (boxes.isEmpty())
+ return 0;
+
+ const GroupBox* column = dynamic_cast<const GroupBox*>(boxes.first());
+ assert(column);
+
+ return column->firstChar();
}
int TextLayout::endOfFrame() const
{
- return m_box->lastChar() + 1;
+ QList<Box*>& boxes = m_box->boxes();
+ if (boxes.isEmpty())
+ return 0;
+
+ const GroupBox* column = dynamic_cast<const GroupBox*>(boxes.last());
+ assert(column);
+
+ return column->lastChar() + 1;
}
More information about the scribus-commit
mailing list