Skip to content

Commit ffbe7df

Browse files
committed
Emit point_size_changed on commit
Ensure non-mouse or programmatic size changes also update the visual layer. Previously only point_size_commit_requested was emitted (for saving/persistence), which could leave visuals out-of-sync. This adds a call to point_size_changed.emit(int(value)) in _on_value_changed_commit to trigger an immediate visual update when the value is committed.
1 parent cf8e6dd commit ffbe7df

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/napari_deeplabcut/ui/layer_stats.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def _on_slider_moved_preview(self, value: int) -> None:
7979

8080
def _on_value_changed_commit(self, value: int) -> None:
8181
self._size_value.setText(str(int(value)))
82+
# Ensure non-mouse / programmatic changes also update the visual layer size
83+
self.point_size_changed.emit(int(value)) # visual update on commit
8284
self.point_size_commit_requested.emit(int(value)) # save / persist
8385

8486
def _emit_commit(self) -> None:

0 commit comments

Comments
 (0)