[Kst] [Bug 128399] Resizing horizontal lines can cause a crash when maintain aspect modifier is held down.

George Staikos staikos at kde.org
Sat Jun 3 18:42:52 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=128399         




------- Additional Comments From staikos kde org  2006-06-03 18:42 -------
Seems like this is all that's needed.  I'd rather not see more changes than 
necessary.  The existence of this code and crash alone are proof of the value 
of doing minimal changes.

 @ -861,7 +861,7  @
       fromPoint = line->from();
       if (shift) {
         double absAspect = fabs(aspect);
-        if (absAspect < 500 && (double(abs((pos.y() - toPoint.y())/(pos.x() - 
toPoint.x()))) < aspect || absAspect < 0.1)) {
+        if (absAspect < 500 && (double(abs((pos.y() - fromPoint.y())/(pos.x() 
- fromPoint.x()))) < aspect || absAspect < 0.1)) {
           toPoint = QPoint(pos.x(), fromPoint.y() + int(aspect*(pos.x() - 
fromPoint.x())));
         } else {
           toPoint = QPoint(fromPoint.x() + int((pos.y() - 
fromPoint.y())/aspect), pos.y());


More information about the Kst mailing list