[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Selection in curve-object... again

From: Ralf Engels
Subject: Selection in curve-object... again
Date: Sat, 11 Jan 2003 01:50:41 +0100

I am again trying to figure out the selection in curve object.
It seems to be broken.

curveobject.c has, in principle, all functions to manage the selection. Every 
path stores for every node the status and there are functions to set and 
query the status.

On the other side there is which does this when a single point 
is selected:

    def SelectPoint(self, p, rect, device, mode):
        found = []
        for i in range(len(self.paths)):
            path = self.paths[i]
            t = path.nearest_point(p.x, p.y)
            if t is not None:
                p2 = path.point_at(t)
                found.append((abs(p - p2), i, t, p2))
        dist, i, t, p2 = min(found)
        self.selected_path = i
        self.selected_idx = t
        self.selection_type = SelCurvePoint
        return const.SelectSingle

First it calls a function which in turn calls the c.module to deselect. Then 
the selection is determined and stored in special variable self.selected_idx

I added a debug output to curveobject.c to check if curve_select_rect is ever 
called. It is not!

So, what is the right way? 
Should curveobject.c handle the selection (I think not) or should do this?

By the way, 
is there a irc channel so we can chat a little bit about problems?



Ralf Engels
Software design engineer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]