[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/calligra/2.6] plugins/textshape/dialogs: Do not display default character style
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2012-12-31 17:56:13
Message-ID: 20121231175613.48939A60C4 () git ! kde ! org
[Download RAW message or body]

Git commit 1307173f2cbada9dd923c7659bc003ed961595fe by Pierre Stirnweiss.
Committed on 31/12/2012 at 18:53.
Pushed by pstirnweiss into branch 'calligra/2.6'.

Do not display default character style

The default character style is shown as "Default" in the combo.
This style is not supposed to be seen/used by the user.

Note: this is not the special character style "None" used to apply
the paragraph style's character properties.

M  +5    -3    plugins/textshape/dialogs/StylesModel.cpp

http://commits.kde.org/calligra/1307173f2cbada9dd923c7659bc003ed961595fe

diff --git a/plugins/textshape/dialogs/StylesModel.cpp \
b/plugins/textshape/dialogs/StylesModel.cpp index 91f87fc..7e33775 100644
--- a/plugins/textshape/dialogs/StylesModel.cpp
+++ b/plugins/textshape/dialogs/StylesModel.cpp
@@ -377,9 +377,11 @@ void StylesModel::updateCharacterStyles()
     qSort(styles.begin(), styles.end(), sortCharacterStyleByName);
 
     foreach(KoCharacterStyle *style, styles) {
-        m_styleList.append(style->styleId());
-        m_styleMapper->setMapping(style, style->styleId());
-        connect(style, SIGNAL(nameChanged(const QString&)), m_styleMapper, \
SLOT(map())); +        if (style != m_styleManager->defaultCharacterStyle()) { //The \
default character style is not user selectable. It only provides individual property \
defaults and is not a style per say. +	    m_styleList.append(style->styleId());
+            m_styleMapper->setMapping(style, style->styleId());
+            connect(style, SIGNAL(nameChanged(const QString&)), m_styleMapper, \
SLOT(map())); +	}
     }
 
     endResetModel();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic