aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableRelations.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableRelations.m')
-rw-r--r--Source/SPTableRelations.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m
index d3212a0e..a65de7ea 100644
--- a/Source/SPTableRelations.m
+++ b/Source/SPTableRelations.m
@@ -302,6 +302,21 @@
}
}
+/**
+ * Menu validation
+ */
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ // Remove row
+ if ([menuItem action] == @selector(removeRelation:)) {
+ [menuItem setTitle:([relationsTableView numberOfSelectedRows] > 1) ? @"Delete Relations" : @"Delete Relation"];
+
+ return ([relationsTableView numberOfSelectedRows] > 0);
+ }
+
+ return [super validateMenuItem:menuItem];
+}
+
/*
* Dealloc.
*/