Skip to content

Commit

Permalink
Fix problem with aligned overlay (#6445)
Browse files Browse the repository at this point in the history
During implementation of #6438 I wrongly assume that the transform box
updates layer `transform` properties. But it update
`layer.affine.transform`, not `layer.transform`

So it lead to bug that could be seen on the video in #6445
  • Loading branch information
Czaki committed Nov 14, 2023
1 parent 41314da commit 4b00f7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions napari/_vispy/layers/base.py
Expand Up @@ -224,6 +224,9 @@ def _on_matrix_change(self):
child_matrix = np.eye(4)
child_matrix[-1, : len(translate)] = (
self.layer.translate[self.layer._slice_input.displayed][::-1]
+ self.layer.affine.translate[self.layer._slice_input.displayed][
::-1
]
- translate
)
for child in self.node.children:
Expand Down

0 comments on commit 4b00f7b

Please sign in to comment.