[Kst] [Bug 121108] Kst assertion failure when line or arrowmoved outside of window

Andrew Walker arwalker at sumusltd.com
Fri Feb 3 00:09:01 CET 2006


If I understand what you're saying correctly then I would disagree.
To be consistent the line should not allow one of its end points
to be dragged outside the parent. I believe this is the behaviour if you
are resizing labels, rectanges, ellipses, etc. and lines should clearly work
the same way. The only way to reparent is to move an object.

-----Original Message-----
From: George Staikos [mailto:staikos at kde.org]
Sent: Thursday, February 02, 2006 1:31 PM
To: kst at kde.org
Subject: Re: [Kst] [Bug 121108] Kst assertion failure when line or
arrowmoved outside of window


On Thursday 02 February 2006 14:14, Barth Netterfield wrote:
> This patch does the correct thing when you drag outside the window.
>
> BUT: if you drag an endpoint outside the parent, but still in the window,
> it similarly truncates.  It should not.  Rather, it should re-parent (eg,
> to the tlv).
>
> George's patch exhibits a variation of the same behavior: the line remains
> a parent of the original plot, but attemps to extend outside the parent.
> Outside the parent, it flickers, but does not stay around.

Any flicker is due to broken clipping.  Reparenting is easy:

        while (line->_parent && static_cast<KstViewObject*>(line->_parent)
!=
static_cast<KstViewObject*>(this)&&
!line->_parent->geometry().contains(line->from()))
{
          KstViewObjectPtr p = static_cast<KstViewObject*>(line->_parent);
          line->detach();
          p->_parent->appendChild(line.data());
        }

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
_______________________________________________
Kst mailing list
Kst at kde.org
https://mail.kde.org/mailman/listinfo/kst



More information about the Kst mailing list