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

Barth Netterfield netterfield at astro.utoronto.ca
Fri Feb 24 17:07:08 UTC 2012


SVN commit 1282110 by netterfield:

Fix some more bugs with annotation objects.


 M  +1 -0      labelitem.cpp  
 M  +1 -2      lineitem.cpp  
 M  +3 -3      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/labelitem.cpp #1282109:1282110
@@ -47,6 +47,7 @@
   _font  = font;
   _color = _dialogDefaults->value(defaultsGroupName()+"/color",QColor(Qt::black)).value<QColor>();
   _scale = _dialogDefaults->value(defaultsGroupName()+"/fontScale",12).toDouble();
+  applyDialogDefaultsLockPosToData();
 }
 
 void LabelItem::saveAsDialogDefaults() const {
--- branches/work/kst/portto4/kst/src/libkstapp/lineitem.cpp #1282109:1282110
@@ -216,7 +216,6 @@
     double dx = P1.x() - P2.x();
     double dy = P1.y() - P2.y();
     width = sqrt(dx*dx + dy*dy)+1.0;
-  }
 
   setPos(centerP.x(), centerP.y());
   setViewRect(-width*0.5, -height*0.5, width, height);
@@ -226,8 +225,8 @@
 
   setTransform(transform);
   updateRelativeSize(true);
-
 }
+}
 
 
 void LineItem::updateDataRelativeRect(bool force) {
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1282109:1282110
@@ -1791,7 +1791,7 @@
 
     setParentViewItem(viewItem);
     setPos(mapToParent(mapFromScene(origin)) + pos() - mapToParent(QPointF(0,0)));
-    updateRelativeSize();
+    updateRelativeSize(true);
 
 #if DEBUG_REPARENT
     qDebug() << "after new parent"
@@ -2077,8 +2077,8 @@
 }
 
 
-QVariant ViewItem::itemChange(GraphicsItemChange change, const QVariant &value) {
-
+QVariant ViewItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
 if (change == ItemSelectedChange) {
     bool selected = value.toBool();
     if (!selected) {


More information about the Kst mailing list