aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/TableContent.m19
-rw-r--r--Source/TableDocument.m2
2 files changed, 18 insertions, 3 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index bc040223..f41df80a 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -3219,7 +3219,7 @@
}
// Duplicate row
- if ([menuItem action] == @selector(copyRow:)) {
+ if ([menuItem action] == @selector(copyRow:)) {
return ([tableContentView numberOfSelectedRows] == 1);
}
@@ -3231,7 +3231,22 @@
*/
- (void)makeContentFilterHaveFocus
{
- [tableWindow makeFirstResponder:argumentField];
+
+ NSDictionary *filter = [[contentFilters objectForKey:compareType] objectAtIndex:[[compareField selectedItem] tag]];
+
+ if([filter objectForKey:@"NumberOfArguments"]) {
+ NSUInteger numOfArgs = [[filter objectForKey:@"NumberOfArguments"] integerValue];
+ switch(numOfArgs) {
+ case 2:
+ [tableWindow makeFirstResponder:firstBetweenField];
+ break;
+ case 1:
+ [tableWindow makeFirstResponder:argumentField];
+ break;
+ default:
+ [tableWindow makeFirstResponder:compareField];
+ }
+ }
}
#pragma mark -
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 69fe4a0c..e72f0b86 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2337,7 +2337,7 @@
{
[self viewContent:self];
- [tableContentInstance makeContentFilterHaveFocus];
+ [tableContentInstance performSelector:@selector(makeContentFilterHaveFocus) withObject:nil afterDelay:0.1];
}
#pragma mark -