[Kst] extragear/graphics/kst/src/libkstapp

Duncan Hanson duncan.hanson at gmail.com
Tue Aug 1 20:57:17 CEST 2006

SVN commit 568625 by dhanson:

CCBUG:131679 fix assertion error when creating newLines. the problem when resizing lines does not occur in the viewaspect branch. something must have been backed out when merging, probably the patch for resize behaviour. currently, a 2 line change in KstTopLevelView::pressMoveLayoutModeEndPoint similar to the one commited is all that's necessary to fix the problem for moving lines, but i'll wait until we figure out what to do about the resizing behaviour before submitting it.

 M  +2 -1      kstgfxmousehandlerutils.cpp  

--- trunk/extragear/graphics/kst/src/libkstapp/kstgfxmousehandlerutils.cpp #568624:568625
@@ -186,7 +186,8 @@
 QRect KstGfxMouseHandlerUtils::newLine(const QPoint& pos, const QPoint& mouseOrigin, bool specialAspect, const QRect& bounds) {
   if (KDE_ISLIKELY(!specialAspect)) {
-    return QRect(mouseOrigin,pos);
+    QPoint npos = KstGfxMouseHandlerUtils::findNearestPtOnLine(mouseOrigin, pos, pos, bounds);
+    return QRect(mouseOrigin, npos);
   } else { //want special 45deg, or vertical, or horizontal line. 
     QPoint npos;
     QPoint mouseDisplacement(pos - mouseOrigin); // for picking type of line..

More information about the Kst mailing list