Fix crop flip mirroring under fine rotation; add crop-tool rotation handles; blank viewer on empty session#435
Closed
linkmodo wants to merge 2 commits into
Closed
Fix crop flip mirroring under fine rotation; add crop-tool rotation handles; blank viewer on empty session#435linkmodo wants to merge 2 commits into
linkmodo wants to merge 2 commits into
Conversation
Flipping while Fine Rotation was set produced a doubled tilt instead of a mirror, because the pipeline applies flip before fine rotation and mirror(rotate(+a)) == rotate(-a, mirror(...)). toggle_flip now negates fine_rotation (and mirrors the manual crop/analysis rects) on every flip so the result is a true mirror of the current render. Also adds four rotation handles at the crop box's edges (outside the crop area) for quick free rotation, composing with the Fine Rotation slider for fine-tuning — both drive the same geometry.fine_rotation field, now capped at +/-45 degrees instead of +/-5.
Removing the last (or only) file via the sidebar's Clear All or the right-click Unload action reset the session state but never told the canvas, so the previous frame stayed on screen with no way to dismiss it. DesktopSessionManager now emits session_emptied whenever the file list becomes empty (shared by clear_files, remove_current_file and remove_selected_files via a new _reset_active_image_state helper, which also fixes clear_files leaving preview_raw/last_metrics stale). The main window clears the canvas and restores the empty-state hint in response, and ignores any render that completes after the session already emptied.
Owner
|
closing this as it's already included in merged #439 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toggle_flipnow negatesfine_rotationon every flip (and mirrors the manual crop / analysis rects along with it), so flip always mirrors what's currently on screen.geometry.fine_rotationfield, now capped at ±45° instead of ±5° so the handles have real range to work with. Shift+drag gives finer sensitivity, and a live angle badge shows during the drag.DesktopSessionManagernow emitssession_emptiedwhenever the file list becomes empty, and the main window clears the canvas / restores the empty-state hint in response. Also guards against a render that completes after the session already emptied.Test plan
uv run pytest— full suite passes except one pre-existing, unrelated Windows path-separator failure (test_export_presets.py::test_output_dir_subfolder_of_source)uv run ruff checkcleanuv run ty check— no new diagnostics introducedsession_emptiedemission/reset across all three removal paths