aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 7936e962..04b4b9f8 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -723,8 +723,20 @@ traps enter key and
return NO;
}
+/*
+ * Updates various interface elements based on the current table view selection.
+ */
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+ if ([notification object] == queryFavoritesView) {
+
+ // Enable/disable buttons
+ [removeQueryFavoriteButton setEnabled:([queryFavoritesView numberOfSelectedRows] == 1)];
+ [copyQueryFavoriteButton setEnabled:([queryFavoritesView numberOfSelectedRows] == 1)];
+ }
+}
-//last but not least
+// Last but not least
- (id)init;
{
self = [super init];
@@ -740,5 +752,4 @@ traps enter key and
[super dealloc];
}
-
@end