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

List:       kde-commits
Subject:    branches/KDE/4.3/kdelibs/plasma
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2009-09-01 11:06:06
Message-ID: 1251803166.554090.15247.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1018143 by aseigo:

don't repaint the entire widget when we're setting the same content
CCBUG:204491


 M  +9 -5      extenderitem.cpp  


--- branches/KDE/4.3/kdelibs/plasma/extenderitem.cpp #1018142:1018143
@@ -156,9 +156,11 @@
 
 void ExtenderItem::setTitle(const QString &title)
 {
-    d->title = title;
-    config().writeEntry("extenderTitle", title);
-    update();
+    if (d->title != title) {
+        d->title = title;
+        config().writeEntry("extenderTitle", title);
+        update();
+    }
 }
 
 QString ExtenderItem::title() const
@@ -205,8 +207,10 @@
 
 void ExtenderItem::setIcon(const QIcon &icon)
 {
-    d->iconName.clear();
-    d->collapseIcon->setIcon(icon);
+    if (d->collapseIcon->icon().isNull() || icon.cacheKey() != d->collapseIcon->icon().cacheKey()) {
+        d->iconName.clear();
+        d->collapseIcon->setIcon(icon);
+    }
 }
 
 void ExtenderItem::setIcon(const QString &icon)
[prev in list] [next in list] [prev in thread] [next in thread] 

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