[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] libs/kotext/styles: Correct logic of previous patch
From: Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date: 2012-12-31 16:45:27
Message-ID: 20121231164527.E91E0A6091 () git ! kde ! org
[Download RAW message or body]
Git commit cfb025315d50d3b0e16b4b4199c4f64e9f50aceb by Pierre Stirnweiss.
Committed on 31/12/2012 at 17:43.
Pushed by pstirnweiss into branch 'master'.
Correct logic of previous patch
M +9 -4 libs/kotext/styles/KoStyleManager.cpp
http://commits.kde.org/calligra/cfb025315d50d3b0e16b4b4199c4f64e9f50aceb
diff --git a/libs/kotext/styles/KoStyleManager.cpp \
b/libs/kotext/styles/KoStyleManager.cpp index e3bb380..c2a64e9 100644
--- a/libs/kotext/styles/KoStyleManager.cpp
+++ b/libs/kotext/styles/KoStyleManager.cpp
@@ -415,10 +415,13 @@ void KoStyleManager::add(KoCharacterStyle *style)
style->setStyleId(d->s_stylesNumber);
d->charStyles.insert(d->s_stylesNumber++, style);
- if (style->isApplied() && !d->m_usedCharacterStyles.contains(d->s_stylesNumber) \
&& !(style == defaultCharacterStyle())) { //defaultStyle should not \
be user visible
- d->m_usedCharacterStyles.append(d->s_stylesNumber);
+ if (style != defaultCharacterStyle()) { //defaultStyle should not be user \
visible + if (style->isApplied() && \
!d->m_usedCharacterStyles.contains(d->s_stylesNumber)) { + \
d->m_usedCharacterStyles.append(d->s_stylesNumber); + }
connect(style, SIGNAL(styleApplied(const KoCharacterStyle*)), this, \
SLOT(slotAppliedStyle(const KoCharacterStyle*))); }
+
emit styleAdded(style);
}
@@ -443,8 +446,10 @@ void KoStyleManager::add(KoParagraphStyle *style)
add(root);
}
- if (style->isApplied() && !d->m_usedParagraphStyles.contains(d->s_stylesNumber) \
&& !(style == defaultParagraphStyle())) { //defaultStyle should not \
be user visible
- d->m_usedParagraphStyles.append(d->s_stylesNumber);
+ if (style != defaultParagraphStyle()) { //defaultStyle should not be user \
visible + if (style->isApplied() && \
!d->m_usedParagraphStyles.contains(d->s_stylesNumber)) { + \
d->m_usedParagraphStyles.append(d->s_stylesNumber); + }
connect(style, SIGNAL(styleApplied(const KoParagraphStyle*)), this, \
SLOT(slotAppliedStyle(const KoParagraphStyle*))); }
emit styleAdded(style);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic