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

Mike Fenton mike at staikos.net
Tue May 26 19:31:22 CEST 2009


SVN commit 973254 by fenton:

Fix inability to control plot rect / tick colours.
Add tracking of pen change for redraw.


 M  +2 -1      plotitem.cpp  
 M  +2 -0      plotitem.h  
 M  +2 -0      viewitem.h  
 M  +1 -1      viewitemdialog.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #973253:973254
@@ -691,8 +691,8 @@
 #endif
   painter->save();
   painter->setBrush(Qt::NoBrush);
+  painter->setPen(pen());
   painter->drawRect(plotRect());
-  painter->restore();
 #if BENCHMARK > 1
     b_3 = benchtmp.elapsed();
 #endif
@@ -704,6 +704,7 @@
 #if BENCHMARK > 1
     b_5 = benchtmp.elapsed();
 #endif
+  painter->restore();
 
 #if BENCHMARK > 1
   int i = bench_time.elapsed();
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.h #973253:973254
@@ -235,6 +235,8 @@
 
     void setAllowUpdates(bool allowed);
 
+    virtual void setItemPen(const QPen & pen) { ViewItem::setPen(pen); setPlotPixmapDirty();}
+
   protected:
     virtual QString _automaticDescriptiveName() const;
     virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.h #973253:973254
@@ -177,6 +177,8 @@
 
     CreationState creationState() const { return _creationState; }
 
+    virtual void setItemPen(const QPen & pen) { setPen(pen); };
+
   Q_SIGNALS:
     void geometryChanged();
     void creationComplete();
--- branches/work/kst/portto4/kst/src/libkstapp/viewitemdialog.cpp #973253:973254
@@ -158,7 +158,7 @@
     p.setWidth(1);
   }
 #endif
-  _item->setPen(p);
+  _item->setItemPen(p);
 }
 
 


More information about the Kst mailing list