diff --git a/src/river_annotation_tool/mask_canvas.py b/src/river_annotation_tool/mask_canvas.py index 43d4f3c..c52e167 100644 --- a/src/river_annotation_tool/mask_canvas.py +++ b/src/river_annotation_tool/mask_canvas.py @@ -51,6 +51,7 @@ class MaskCanvas: (0, 0), radius=5, fill=False, color="white", linewidth=1.5, visible=False ) self.ax.add_patch(self.brush_circle) + self.ax.autoscale(False) # prevent polygon plot() calls from expanding the view def _build_controls(self): self.btn_erase = QPushButton("Eraser") @@ -137,6 +138,8 @@ class MaskCanvas: self._current_frame = frames[0] self._clear_poly_state() self.img_artist.set_data(self._apply_image_adjustments(frames[0])) + self.ax.set_xlim(-0.5, dw - 0.5) + self.ax.set_ylim(dh - 0.5, -0.5) self.set_title(title) self.redraw()