From afad99c5e049e30cbe1ac3e9c4dfce7de28501a1 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 14 Feb 2011 00:05:14 +0000 Subject: - When changing column selections in the filter dropdowns, preserve the filter comparison type if possible --- Source/SPTableContent.m | 7 +++++++ 1 file changed, 7 insertions(+) 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]; -- cgit v1.2.3