From c6bab140434a19720fd5ca5614f80e85cb270d3b Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Wed, 30 Aug 2023 09:33:04 +1200 Subject: [PATCH] ui: actually resolve circulars + fix flip bounding boxes AR unset --- .../Canvas/BoundingBox/ParamBoundingBoxSize.tsx | 11 ++++++++++- .../src/features/parameters/store/generationSlice.ts | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx index 4c2e6d252c..7725461fd3 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Canvas/BoundingBox/ParamBoundingBoxSize.tsx @@ -80,7 +80,16 @@ export default function ParamBoundingBoxSize() { size="sm" icon={} fontSize={20} - onClick={() => dispatch(flipBoundingBoxAxes())} + onClick={() => { + dispatch(flipBoundingBoxAxes()); + if ( + ![null, 2 / 3, 16 / 9, 1 / 1].includes( + boundingBoxDimensions.height / boundingBoxDimensions.width + ) + ) { + dispatch(setAspectRatio(null)); + } + }} /> { - state.aspectRatio = null; - }); }, });