feat: add explicit left/right orientation with swap button

Fixes mirrored slice exports by making orientation explicit:

- PhotoSlice.swapped flag persists a user left/right swap
- swap_left_right() mirrors [TL,TR,BR,BL] -> [TR,TL,BL,BR]
- normalize_top_left() honors the flag so squarize/reset_rotation
  no longer overwrite manual orientation
- Swap L/R toolbar button wired through canvas state + controller
- Color-code left (orange) vs right (cyan) corners and edges
This commit is contained in:
dan 2026-09-11 21:33:59 +02:00
parent 047ea60fa5
commit 607f5e0c57
7 changed files with 114 additions and 31 deletions

View file

@ -192,6 +192,15 @@ class CanvasStateMixin:
self.update()
return True
# swap_active_slice_left_right: function definition for ScanSlicer behavior.
def swap_active_slice_left_right(self):
active_slice = self.get_active_slice()
if active_slice is None:
return False
active_slice.swap_left_right()
self.update()
return True
# reset_active_slice_rotation: function definition for ScanSlicer behavior.
def reset_active_slice_rotation(self):
active_slice = self.get_active_slice()