Reproduce:
* Add a new page to have 2 pages
* Add a text shape
* Enter enough lines to more than fill the shape
KWRootAreaProvider::provide() returns a root area without an associated shape,
hence assert in TextTool.cpp:1284
Att. patch adds a check for associated shape to avoid this.
I don't have full understanding of the logic so I do not know if this
introduces problems.
Could somebody in the know commit if it is ok, or maybe find a proper solution
:)
--
Mvh.
Dag Andersen
diff --git a/plugins/textshape/TextTool.cpp b/plugins/textshape/TextTool.cpp
index 3917066..142d934 100644
--- a/plugins/textshape/TextTool.cpp
+++ b/plugins/textshape/TextTool.cpp
@@ -1278,8 +1278,7 @@ void TextTool::ensureCursorVisible(bool moveView)
KoTextDocumentLayout *lay = qobject_cast<KoTextDocumentLayout*>(m_textShapeData->document()->documentLayout());
Q_ASSERT(lay);
KoTextLayoutRootArea *rootArea = lay->rootAreaForPosition(position);
-
- if (rootArea && m_textShapeData->rootArea() != rootArea) {
+ if (rootArea && rootArea->associatedShape() && m_textShapeData->rootArea() != rootArea) {
// If we have changed root area we need to update m_textShape and m_textShapeData
m_textShape = static_cast<TextShape*>(rootArea->associatedShape());
Q_ASSERT(m_textShape);
_______________________________________________
calligra-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/calligra-devel