aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPIndexesController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-07-04 18:44:34 +0000
committerstuconnolly <stuart02@gmail.com>2011-07-04 18:44:34 +0000
commit17309b1f8bc10f674941b0a375ecc0cc8a189945 (patch)
treeab1ca82526e4c3a28c7feb71070a438cda1ba16c /Source/SPIndexesController.m
parent9656acfb483603af970236decec2846adf89a8c3 (diff)
downloadsequelpro-17309b1f8bc10f674941b0a375ecc0cc8a189945.tar.gz
sequelpro-17309b1f8bc10f674941b0a375ecc0cc8a189945.tar.bz2
sequelpro-17309b1f8bc10f674941b0a375ecc0cc8a189945.zip
Fixes for issue #1098:
- Fix logic for enabling/disabling the index storage type popup button when changing the index type. - Add a number formatter to the index length field.
Diffstat (limited to 'Source/SPIndexesController.m')
-rw-r--r--Source/SPIndexesController.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index f045c9b3..8058ff3f 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -150,13 +150,12 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
*/
- (IBAction)addIndex:(id)sender
{
-
// Check whether table editing is permitted (necessary as some actions - eg table double-click - bypass validation)
if ([dbDocument isWorking] || [tablesList tableType] != SPTableTypeTable) return;
// Check whether a save of the current field row is required.
if (![tableStructure saveRowOnDeselect]) return;
-
+
// Reset visibility of the primary key item
[[[indexTypePopUpButton menu] itemWithTag:SPPrimaryKeyMenuTag] setHidden:NO];
@@ -340,8 +339,10 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
}
#ifndef SP_REFACTOR
+ NSString *engine = [[tableData statusValues] objectForKey:@"Engine"];
+
// Specifiying an index storage type (i.e. HASH or BTREE) is not permitted with SPATIAL indexes
- [indexStorageTypePopUpButton setEnabled:(indexType != SPSpatialMenuTag)];
+ [indexStorageTypePopUpButton setEnabled:(indexType != SPSpatialMenuTag) && !([engine isEqualToString:@"MyISAM"] || [engine isEqualToString:@"InnoDB"])];
#endif
}
}