(curr, first)
| 46 | def mouseMoveEvent(self, ev): |
| 47 | if self.drawEnable: |
| 48 | def in_end_range(curr, first): |
| 49 | return first.x() - 5 <= curr.x() <= first.x() + 5 and first.y() - 5 <= curr.y() <= first.y() + 5 |
| 50 | |
| 51 | if len(self.current_points) > 0 and in_end_range(ev.pos(), self.current_points[0]): |
| 52 | self.current_points.append(self.current_points[0]) |