add get_snap_ptrefs_within_range()
This commit is contained in:
parent
e3c9d19e9a
commit
9f9747cbe8
@ -529,6 +529,15 @@ class SketchWidget:
|
||||
return closest_ptref
|
||||
return None
|
||||
|
||||
def get_snap_ptrefs_within_range(self, x, y):
|
||||
ptrefs = []
|
||||
for p in self.snap_ptrefs:
|
||||
screen_pt = self.snap_ptrefs[p]
|
||||
dist = self.dist2_bw((x, self.size[1] - y), screen_pt)
|
||||
if dist <= self.snap_dist2:
|
||||
ptrefs.append(p)
|
||||
return ptrefs
|
||||
|
||||
def update_hover_snap_point(self, sp):
|
||||
if sp is not None:
|
||||
if sp != self.hover_snap_ptref:
|
||||
|
Loading…
x
Reference in New Issue
Block a user