aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-07-10 21:19:25 +0000
committerrowanbeentje <rowan@beent.je>2011-07-10 21:19:25 +0000
commit9555a14652f743243c590455324a03bca702efd1 (patch)
tree5bbdc5e57f64000357128c4ec4d4ea8eaa4dbe09
parent59527d9acd227a9a924fbd66ed29b85ea8b65a02 (diff)
downloadsequelpro-9555a14652f743243c590455324a03bca702efd1.tar.gz
sequelpro-9555a14652f743243c590455324a03bca702efd1.tar.bz2
sequelpro-9555a14652f743243c590455324a03bca702efd1.zip
- Abort editing when cancelling the user manager sheet; this addresses exceptions redrawing the offscreen outline rows, addressing http://spbug.com/l/1406 .
-rw-r--r--Source/SPUserManager.m10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 565cfc6f..83f0a12f 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -594,6 +594,10 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
*/
- (IBAction)doCancel:(id)sender
{
+
+ // Change the first responder to end editing in any field
+ [[self window] makeFirstResponder:self];
+
[[self managedObjectContext] rollback];
// Close sheet
@@ -609,9 +613,9 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
NSError *error = nil;
errorsString = [[NSMutableString alloc] init];
- //Change the first responder to end editing in any field
- [[self window] makeFirstResponder:self];
-
+ // Change the first responder to end editing in any field
+ [[self window] makeFirstResponder:self];
+
isSaving = YES;
[[self managedObjectContext] save:&error];
isSaving = NO;