Skip to content
Permalink
Browse files

Fix an issue with resetting auto_increment values (caused by previous…

… commit)
  • Loading branch information...
dmoagx committed Feb 15, 2016
1 parent 8795dcb commit 7374c4a5e62e9dfe5b725478fc491960082df926
Showing with 6 additions and 1 deletion.
  1. +6 −1 Source/SPExtendedTableInfo.m
@@ -224,14 +224,19 @@ - (IBAction)tableRowAutoIncrementWasEdited:(id)sender
{
[tableRowAutoIncrement setEditable:NO];

[tableSourceInstance takeAutoIncrementFrom:tableRowAutoIncrement];
NSNumberFormatter *fmt = [[[NSNumberFormatter alloc] init] autorelease];
[fmt setNumberStyle:NSNumberFormatterDecimalStyle];
NSNumber *value = [fmt numberFromString:[tableRowAutoIncrement stringValue]];

[tableSourceInstance setAutoIncrementTo:value];
}

- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
{
// Listen to ESC to abort editing of auto increment input field
if (command == @selector(cancelOperation:) && control == tableRowAutoIncrement) {
[tableRowAutoIncrement abortEditing];
[tableRowAutoIncrement setEditable:NO];
return YES;
}

0 comments on commit 7374c4a

Please sign in to comment.
You can’t perform that action at this time.