[Kst] branches/work/kst/portto4/kst/src/libkstapp
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Jun 19 23:33:30 UTC 2012
SVN commit 1302005 by netterfield:
Line and arrow dimensions were sometimes very off when opened in the
dialog. This fixes it.
M +5 -4 linedimensionstab.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/linedimensionstab.cpp #1302004:1302005
@@ -42,10 +42,11 @@
QRectF pr = _viewItem->parentRect();
QPointF P1 = _viewItem->mapToParent(QPoint(_viewItem->rect().left(), _viewItem->rect().center().y()));
QPointF P2 = _viewItem->mapToParent(QPoint(_viewItem->rect().right(), _viewItem->rect().center().y()));
- _p1X->setValue(P1.x()/pr.width());
- _p2X->setValue(P2.x()/pr.width());
- _p1Y->setValue(P1.y()/pr.height());
- _p2Y->setValue(P2.y()/pr.height());
+ //qDebug() << pr << P1 << P2;
+ _p1X->setValue((P1.x()-pr.left())/pr.width());
+ _p2X->setValue((P2.x()-pr.left())/pr.width());
+ _p1Y->setValue((P1.y()-pr.top())/pr.height());
+ _p2Y->setValue((P2.y()-pr.top())/pr.height());
}
}
More information about the Kst
mailing list