aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-07-02 16:21:49 +0000
committerstuconnolly <stuart02@gmail.com>2010-07-02 16:21:49 +0000
commit6b8fed25e1745f4a3f890cb190228c9b12857de3 (patch)
tree3d0fe47dd747d3e44acb28fb5e215ff736ff2580 /Source
parentacb91a494111b5bae59308533df06fe890a8b2d3 (diff)
downloadsequelpro-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')
-rw-r--r--Source/SPExportController.h3
-rw-r--r--Source/SPExportController.m27
2 files changed, 16 insertions, 14 deletions
diff --git a/Source/SPExportController.h b/Source/SPExportController.h
index 3ccdfd74..274da7ed 100644
--- a/Source/SPExportController.h
+++ b/Source/SPExportController.h
@@ -221,7 +221,8 @@
*/
NSMutableArray *exportFiles;
- NSInteger heightOffset;
+ NSInteger heightOffset1;
+ NSInteger heightOffset2;
NSUInteger windowMinWidth;
NSUInteger windowMinHeigth;
}
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];