diff options
author | stuconnolly <stuart02@gmail.com> | 2010-07-02 16:21:49 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-07-02 16:21:49 +0000 |
commit | 6b8fed25e1745f4a3f890cb190228c9b12857de3 (patch) | |
tree | 3d0fe47dd747d3e44acb28fb5e215ff736ff2580 /Source/SPExportController.m | |
parent | acb91a494111b5bae59308533df06fe890a8b2d3 (diff) | |
download | sequelpro-6b8fed25e1745f4a3f890cb190228c9b12857de3.tar.gz sequelpro-6b8fed25e1745f4a3f890cb190228c9b12857de3.tar.bz2 sequelpro-6b8fed25e1745f4a3f890cb190228c9b12857de3.zip |
Fix the behaviour of the export dialog when toggling the customise filename and advanced options views.
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r-- | Source/SPExportController.m | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 09c8d4d7..825580a5 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -87,7 +87,8 @@ showAdvancedView = NO; showCustomFilenameView = NO; - heightOffset = 0; + heightOffset1 = 0; + heightOffset2 = 0; windowMinWidth = [[self window] minSize].width; windowMinHeigth = [[self window] minSize].height; @@ -849,17 +850,17 @@ [exportCustomFilenameViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; [exportCustomFilenameView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta; + NSInteger newMinHeight = (windowMinHeigth - heightOffset1 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset1 + delta; [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; - frame.origin.y += heightOffset; - frame.size.height -= heightOffset; + frame.origin.y += heightOffset1; + frame.size.height -= heightOffset1; - heightOffset = delta; + heightOffset1 = delta; - frame.origin.y -= heightOffset; - frame.size.height += heightOffset; + frame.origin.y -= heightOffset1; + frame.size.height += heightOffset1; [[self window] setFrame:frame display:YES animate:YES]; @@ -897,17 +898,17 @@ [exportAdvancedOptionsViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; [exportAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta; + NSInteger newMinHeight = (windowMinHeigth - heightOffset2 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset2 + delta; [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; - frame.origin.y += heightOffset; - frame.size.height -= heightOffset; + frame.origin.y += heightOffset2; + frame.size.height -= heightOffset2; - heightOffset = delta; + heightOffset2 = delta; - frame.origin.y -= heightOffset; - frame.size.height += heightOffset; + frame.origin.y -= heightOffset2; + frame.size.height += heightOffset2; [[self window] setFrame:frame display:YES animate:YES]; |