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:
parent
047ea60fa5
commit
607f5e0c57
7 changed files with 114 additions and 31 deletions
|
|
@ -26,6 +26,7 @@ class ScanSlicerCanvasActionsMixin:
|
|||
self.active_box_lock_button.setEnabled(False)
|
||||
self.active_box_squarize_button.setEnabled(False)
|
||||
self.active_box_reset_rotation_button.setEnabled(False)
|
||||
self.active_box_swap_button.setEnabled(False)
|
||||
self.active_box_remove_button.setEnabled(False)
|
||||
self.active_box_lock_button.blockSignals(True)
|
||||
self.active_box_lock_button.setChecked(False)
|
||||
|
|
@ -38,6 +39,7 @@ class ScanSlicerCanvasActionsMixin:
|
|||
self.active_box_lock_button.setEnabled(True)
|
||||
self.active_box_squarize_button.setEnabled(True)
|
||||
self.active_box_reset_rotation_button.setEnabled(True)
|
||||
self.active_box_swap_button.setEnabled(True)
|
||||
self.active_box_remove_button.setEnabled(True)
|
||||
self.active_box_lock_button.blockSignals(True)
|
||||
self.active_box_lock_button.setChecked(active_slice.locked)
|
||||
|
|
@ -69,6 +71,13 @@ class ScanSlicerCanvasActionsMixin:
|
|||
return
|
||||
self.update_statusbar("Active box squarized.")
|
||||
|
||||
# swap_active_box_left_right: function definition for ScanSlicer behavior.
|
||||
def swap_active_box_left_right(self):
|
||||
if not self.slicing_canvas.swap_active_slice_left_right():
|
||||
self.update_statusbar("No active box selected.")
|
||||
return
|
||||
self.update_statusbar("Active box left/right swapped.")
|
||||
|
||||
# reset_active_box_rotation: function definition for ScanSlicer behavior.
|
||||
def reset_active_box_rotation(self):
|
||||
if not self.slicing_canvas.reset_active_slice_rotation():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue