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

Barth Netterfield netterfield at astro.utoronto.ca
Tue Mar 15 14:40:14 CET 2011


SVN commit 1224983 by netterfield:

Fix view settings on command line startup, by explicitly setting the
scene size to something non-zero.

This change appears to have been made necessary by at qt update,
but I'm not sure of that.



 M  +0 -1      plotitem.cpp  
 M  +3 -2      view.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1224982:1224983
@@ -3638,7 +3638,6 @@
 
 void CreatePlotForCurve::createItem() {
   _item = new PlotItem(_view);
-
   creationComplete(); //add to undo stack
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1224982:1224983
@@ -70,6 +70,7 @@
   setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
   setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
   setScene(new Scene(this));
+  scene()->setSceneRect(rect());
   scene()->installEventFilter(this);
   setInteractive(true);
   setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
@@ -384,7 +385,7 @@
 
     viewport()->resize(size);
 
-    setSceneRect(QRectF(0.0, 0.0, size.width() - 4.0, size.height() - 4.0));
+    setSceneRect(QRectF(0.0, 0.0, size.width() - 1.0, size.height() - 1.0));
 
     updateBrush();
 
@@ -411,7 +412,7 @@
   if (size() != sceneRect().size()) {
     QRectF oldSceneRect = sceneRect();
 
-    setSceneRect(QRectF(0.0, 0.0, width() - 4.0, height() - 4.0));
+    setSceneRect(QRectF(0.0, 0.0, width() - 1.0, height() - 1.0));
 
     updateBrush();
 


More information about the Kst mailing list