aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-09-17 21:07:34 +0000
committerstuconnolly <stuart02@gmail.com>2010-09-17 21:07:34 +0000
commit3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c (patch)
tree81d148269f19ee9395f2d8b1546f249072a5eddc /Source
parent78a2c32e9d163a558be1d221770587639a92fd6e (diff)
downloadsequelpro-3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c.tar.gz
sequelpro-3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c.tar.bz2
sequelpro-3b9f9e101c56130afcc9d83339c0bd01d1bbaa3c.zip
- When opening the add new sheet, ensure that the remove button is disabled when there is only one indexed field.
- When cancelling adding a new index reset the indexed columns.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPIndexesController.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index 7302a4a5..80e8434c 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -161,6 +161,9 @@ NSString *SPNewIndexStorageType = @"IndexStorageType";
modalDelegate:self
didEndSelector:@selector(addIndexSheetDidEnd:returnCode:contextInfo:)
contextInfo:nil];
+
+ // Because there is only one indexed column initially, disable the remove button
+ [removeIndexedColumnButton setEnabled:NO];
}
/**
@@ -242,12 +245,19 @@ NSString *SPNewIndexStorageType = @"IndexStorageType";
[indexAdvancedOptionsView setHidden:YES];
[indexAdvancedOptionsViewButton setState:NSOffState];
+ // 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];
}
/**