Bug 118684 - Lines that are creating going through boxes, images, or text boxes end up as childrent of the box.
Summary: Lines that are creating going through boxes, images, or text boxes end up as ...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 04:58 UTC by Netterfield
Modified: 2005-12-20 06:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Netterfield 2005-12-20 04:58:00 UTC
Version:           1.2.0_devel (using KDE 3.4.2 Level "b" , SUSE 10.0)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13-15.7-default

Start kst.
Draw a rectangle.
Draw a line which starts well outside the rectangle, goes through the rectangle, and ends outside the rectangle.

Only the part of the line which goes through the box is drawn, and the line is a child of the box.

It should be a child of the highest object which fully contains it, which in this case is the tlv.
Comment 1 George Staikos 2005-12-20 06:00:34 UTC
SVN commit 489907 by staikos:

normalize rects before searching for the child to place the object in now that
the rects are actually invalid
BUG: 118684


 M  +1 -1      kstgfxarrowmousehandler.cpp  
 M  +3 -2      kstgfxlinemousehandler.cpp  


--- trunk/extragear/graphics/kst/kst/kstgfxarrowmousehandler.cpp #489906:489907
@@ -84,7 +84,7 @@
     copyDefaults(KstViewObjectPtr(arrow));
     arrow->setFrom(_prevBand.topLeft());
     arrow->setTo(_prevBand.bottomRight());
-    KstViewObjectPtr container = view->findDeepestChild(_prevBand);
+    KstViewObjectPtr container = view->findDeepestChild(_prevBand.normalize());
     if (!container) {
       container = view;
     }
--- trunk/extragear/graphics/kst/kst/kstgfxlinemousehandler.cpp #489906:489907
@@ -22,6 +22,7 @@
 #include "kstgfxlinemousehandler.h"
 #include "kstgfxmousehandlerutils.h"
 #include "kst.h"
+#include "ksdebug.h"
 #include "kstdoc.h"
 #include "kstviewline.h"
 #include "kstviewwidget.h"
@@ -42,7 +43,7 @@
 
 
 void KstGfxLineMouseHandler::pressMove(KstTopLevelViewPtr view, const QPoint& pos, bool shift, const QRect& geom) {
-  Q_UNUSED(geom);
+  Q_UNUSED(geom)
   if (_cancelled || !_mouseDown) {
     return;  
   }
@@ -80,7 +81,7 @@
     copyDefaults(KstViewObjectPtr(line));
     line->setFrom(_prevBand.topLeft());
     line->setTo(_prevBand.bottomRight());
-    KstViewObjectPtr container = view->findDeepestChild(_prevBand);
+    KstViewObjectPtr container = view->findDeepestChild(_prevBand.normalize());
     if (!container) {
       container = view;
     }