[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/textshape-stylesWidget-PierreSt] libs/kotext/styles: Correct logic of previous patch
From: Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date: 2012-12-31 16:44:21
Message-ID: 20121231164421.B689BA6091 () git ! kde ! org
[Download RAW message or body]
Git commit 5716300a666bb75c68247d8d114e3ee25638a626 by Pierre Stirnweiss.
Committed on 31/12/2012 at 17:43.
Pushed by pstirnweiss into branch 'textshape-stylesWidget-PierreSt'.
Correct logic of previous patch
M +9 -4 libs/kotext/styles/KoStyleManager.cpp
http://commits.kde.org/calligra/5716300a666bb75c68247d8d114e3ee25638a626
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