aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManager.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r--Source/SPUserManager.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 8b7a3f33..eb69203a 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -464,6 +464,9 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
*/
- (IBAction)doCancel:(id)sender
{
+ // Discard any pending changes
+ [treeController discardEditing];
+
// Change the first responder to end editing in any field
[[self window] makeFirstResponder:self];
@@ -479,6 +482,12 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
*/
- (IBAction)doApply:(id)sender
{
+
+ // If editing can't be committed, cancel the apply
+ if (![treeController commitEditing]) {
+ return;
+ }
+
errorsString = [[NSMutableString alloc] init];
// Change the first responder to end editing in any field