don't repaint the entire widget when we're setting the same content
CCBUG:204491 svn path=/trunk/KDE/kdelibs/; revision=1018140
This commit is contained in:
parent
eb5b7d040c
commit
309272b6f9
@ -156,9 +156,11 @@ KConfigGroup ExtenderItem::config() const
|
|||||||
|
|
||||||
void ExtenderItem::setTitle(const QString &title)
|
void ExtenderItem::setTitle(const QString &title)
|
||||||
{
|
{
|
||||||
d->title = title;
|
if (d->title != title) {
|
||||||
config().writeEntry("extenderTitle", title);
|
d->title = title;
|
||||||
update();
|
config().writeEntry("extenderTitle", title);
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ExtenderItem::title() const
|
QString ExtenderItem::title() const
|
||||||
@ -205,8 +207,10 @@ QGraphicsItem *ExtenderItem::widget() const
|
|||||||
|
|
||||||
void ExtenderItem::setIcon(const QIcon &icon)
|
void ExtenderItem::setIcon(const QIcon &icon)
|
||||||
{
|
{
|
||||||
d->iconName.clear();
|
if (d->collapseIcon->icon().isNull() || icon.cacheKey() != d->collapseIcon->icon().cacheKey()) {
|
||||||
d->collapseIcon->setIcon(icon);
|
d->iconName.clear();
|
||||||
|
d->collapseIcon->setIcon(icon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtenderItem::setIcon(const QString &icon)
|
void ExtenderItem::setIcon(const QString &icon)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user