diff options
author | stuconnolly <stuart02@gmail.com> | 2010-09-18 14:49:01 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-09-18 14:49:01 +0000 |
commit | ae8935e94513139f2ea0d10cba6757fef14fa86d (patch) | |
tree | 723b529a509e068c16825d13d193fb53327fda0f /Source | |
parent | db8ab76fad224642ded1de75bf531763e2acfffb (diff) | |
download | sequelpro-ae8935e94513139f2ea0d10cba6757fef14fa86d.tar.gz sequelpro-ae8935e94513139f2ea0d10cba6757fef14fa86d.tar.bz2 sequelpro-ae8935e94513139f2ea0d10cba6757fef14fa86d.zip |
Add index sheet:
- Fix an exception caused when cancelling adding an index with the advanced options view open.
- Move 'Cancel and 'Add' buttons to be inline with index type and name controls.
Both found/suggested by Rowan.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPIndexesController.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m index 80e8434c..9cc7f1d1 100644 --- a/Source/SPIndexesController.m +++ b/Source/SPIndexesController.m @@ -146,6 +146,12 @@ NSString *SPNewIndexStorageType = @"IndexStorageType"; } } + // Reset the indexed columns + [indexedFields removeAllObjects]; + [indexedFields addObject:[[[fields objectAtIndex:0] copy] autorelease]]; + + [indexedColumnsTableView reloadData]; + [addIndexedColumnButton setEnabled:([indexedFields count] < [fields count])]; // Index storage types (HASH & BTREE) are only available some storage engines @@ -247,17 +253,11 @@ NSString *SPNewIndexStorageType = @"IndexStorageType"; // Hide the size column [indexSizeTableColumn setHidden:YES]; - - // Reset the indexed columns - [indexedFields removeAllObjects]; - [indexedFields addObject:[[[fields objectAtIndex:0] copy] autorelease]]; [self _resizeWindowForAdvancedOptionsViewByHeightDelta:0]; [NSApp endSheet:[sender window] returnCode:[sender tag]]; - [[sender window] orderOut:self]; - - [self _reloadIndexedColumnsTableData]; + [[sender window] orderOut:self]; } /** |