Skip to content

Commit 6bfd892

Browse files
committed
fix point insertion cannot be cancled
1 parent 8182427 commit 6bfd892

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plotpy/tools/curve.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,9 @@ def insert_point_at_selection(
845845
param.set_max_index(self.__x.size - 1)
846846
param.index = self.__idx
847847
param.value = self.__y[self.__idx - 1 : self.__idx + 1].mean()
848-
param.edit()
848+
849+
if not param.edit():
850+
return
849851

850852
insertion_index: int = param.index + param.index_offset # type: ignore
851853
new_x: float = self.__x[insertion_index - 1 : insertion_index + 1].mean()

0 commit comments

Comments
 (0)