diff options
author | stuconnolly <stuart02@gmail.com> | 2012-04-16 20:16:52 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-04-16 20:16:52 +0000 |
commit | 4cad6f0e6e4fb497b480256c2abe3de34ebf225c (patch) | |
tree | b66d6a72a1537cf98624acf3c685f1a4d916fd86 /Source/SPTableView.m | |
parent | 0d3b69f964a8d9d93ca794d457b461463f1ec95d (diff) | |
download | sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.gz sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.bz2 sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.zip |
Bring outline view branch up to date with trunk.
Diffstat (limited to 'Source/SPTableView.m')
-rw-r--r-- | Source/SPTableView.m | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m index e135e16b..3fced944 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -241,6 +241,34 @@ emptyDoubleClickAction = aSelector; } +#ifdef SP_REFACTOR + +- (void)delete:(id)sender +{ + if ( [[self delegate] respondsToSelector:@selector(removeField:)] ) + { + [[self delegate] performSelector:@selector(removeField:) withObject:self]; + } + else if ( [[self delegate] respondsToSelector:@selector(removeIndex:)] ) + { + [[self delegate] performSelector:@selector(removeIndex:) withObject:self]; + } +} + + +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + if ( [menuItem action] == @selector(delete:) ) + { + if ( [self numberOfSelectedRows] == 0 ) + return NO; + } + + return YES; +} + +#endif + @end |