[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kword/part/frames
From: Thomas Zander <zander () kde ! org>
Date: 2011-01-04 10:18:02
Message-ID: 20110104101802.4A259AC8B2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1211502 by zander:
Make test a bit more intelligent.
M +9 -1 KWTextFrameSet.cpp
--- trunk/koffice/kword/part/frames/KWTextFrameSet.cpp #1211501:1211502
@@ -136,7 +136,15 @@
Q_ASSERT(frameCount() > 1);
return;
}
- if (frameCount() == 1 && m_document->isEmpty()) { // just added first frame...
+ bool replaceDocument = false;
+ if (frameCount() == 1 && m_document->isEmpty()) {
+ // double check if its really empty.
+ KoTextDocument doc(m_document);
+ if (doc.textEditor() == 0)
+ replaceDocument = true;
+ }
+
+ if (replaceDocument) { // just added first frame...
delete m_document;
m_document = data->document();
m_document->setDocumentLayout(new KWTextDocumentLayout(this));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic