aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-08-25 23:03:00 +0000
committerrowanbeentje <rowan@beent.je>2011-08-25 23:03:00 +0000
commit4f35896057fdc7b6e16c55cf4805177c00967f18 (patch)
tree78f5f1d515d38361f24501493b3991e14f92acab /Source/SPExportController.m
parentbd96d373385c8d2aff108269c1e89063cd48e416 (diff)
downloadsequelpro-4f35896057fdc7b6e16c55cf4805177c00967f18.tar.gz
sequelpro-4f35896057fdc7b6e16c55cf4805177c00967f18.tar.bz2
sequelpro-4f35896057fdc7b6e16c55cf4805177c00967f18.zip
- Prevent export and indexes controller awakeFromNib: routines from being run multiple times
- Fix crashes and exceptions when using "Use monospaced fonts" or "Display vertical grid lines" preferences after closing at least one window
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r--Source/SPExportController.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index f9d5628e..2c93128f 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -83,7 +83,9 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
[self setExportCancelled:NO];
[self setExportToMultipleFiles:YES];
-
+
+ mainNibLoaded = NO;
+
exportType = SPSQLExport;
exportSource = SPTableExport;
exportTableCount = 0;
@@ -119,7 +121,12 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
* Upon awakening select the first toolbar item
*/
- (void)awakeFromNib
-{
+{
+
+ // As this controller also loads its own nib, it may call awakeFromNib multiple times; perform setup only once.
+ if (mainNibLoaded) return;
+ mainNibLoaded = YES;
+
// Select the 'selected tables' option
[exportInputPopUpButton selectItemAtIndex:SPTableExport];