aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableContent.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 7d64ed4b..a513ea15 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -2257,7 +2257,10 @@
return;
}
+ // Retrieve the current field comparison setting for later restoration if possible
+ NSString *titleToRestore = [[compareField selectedItem] title];
+ // Reset the menu before building it back up
[compareField removeAllItems];
NSString *fieldTypeGrouping;
@@ -2378,6 +2381,10 @@
[menu addItem:item];
[item release];
+ // Attempt to reselect the previously selected title, falling back to the first item
+ [compareField selectItemWithTitle:titleToRestore];
+ if (![compareField selectedItem]) [compareField selectItemAtIndex:0];
+
// Update the argumentField enabled state
[self performSelectorOnMainThread:@selector(toggleFilterField:) withObject:self waitUntilDone:YES];