diff options
author | rowanbeentje <rowan@beent.je> | 2011-08-25 23:03:00 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-08-25 23:03:00 +0000 |
commit | 4f35896057fdc7b6e16c55cf4805177c00967f18 (patch) | |
tree | 78f5f1d515d38361f24501493b3991e14f92acab /Source/SPExportController.m | |
parent | bd96d373385c8d2aff108269c1e89063cd48e416 (diff) | |
download | sequelpro-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.m | 11 |
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]; |