From 404c91f6badf709ed605aec5990b052fbc52b84a Mon Sep 17 00:00:00 2001 From: Joshua Fuhs Date: Fri, 20 Jul 2012 23:02:09 -0400 Subject: [PATCH] Fix a bug that I introduced where rotating the stack axis can swap the X and Y master dimensions. --- src/View.ahk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/View.ahk b/src/View.ahk index 68b50f6..0d3f650 100644 --- a/src/View.ahk +++ b/src/View.ahk @@ -206,7 +206,10 @@ View_rotateLayoutAxis(i, d) { } Else { n := Manager_loop(View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i%, d, 1, 3) ; When we rotate the axis, we may need to swap the X and Y dimensions. - If Not (n = View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i%) And (n = 1) Or (View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i% = 1) { + ; We only need to check this when the master axis changes (i = 2) + ; If the axis doesn't change, there's no need to adjust (Not (n = View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i%)) + ; If the original axis was 1 (X) or the new axis is 1 (X) (Y and Z are defined to be the same) + If (i = 2) And Not (n = View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i%) And ((n = 1) Or (View_#%Manager_aMonitor%_#%v%_layoutAxis_#%i% = 1)) { tmp := View_#%Manager_aMonitor%_#%v%_layoutMX View_#%Manager_aMonitor%_#%v%_layoutMX := View_#%Manager_aMonitor%_#%v%_layoutMY View_#%Manager_aMonitor%_#%v%_layoutMY := tmp