[Kst] branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at gmx.net
Tue Oct 26 00:41:57 CEST 2010


SVN commit 1189788 by kuemmel:

reduce flickering, using Qt::transparent is better but maybe to
expensive

CCBUG: 254922


 M  +6 -4      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1189787:1189788
@@ -947,8 +947,11 @@
 
   QPixmap pixmap(sceneBoundingRect().size().toSize());
   pixmap.fill(Qt::white);
+  // Qt::transparent is maybe too expensive, and when 
+  // not moving a plot it also has no transparent background
+  //pixmap.fill(Qt::transparent);
   QPainter painter(&pixmap);
-  paint(&painter); // TODO also paint curves
+  paint(&painter); // TODO also paint annotations
   QList<QGraphicsItem*> children = childItems();
   foreach(QGraphicsItem* child, children) {
     ViewItem* item = qgraphicsitem_cast<ViewItem*>(child);
@@ -956,10 +959,9 @@
       item->paint(&painter);
     }
   }
+  painter.end();
 
-  painter.end();
-  pixmap.setMask(pixmap.createHeuristicMask());
-  drag->setPixmap(pixmap.scaled(pixmap.size()));
+  drag->setPixmap(pixmap);
   drag->setHotSpot(hotspot.toPoint());
 
   hide();


More information about the Kst mailing list