diff options
author | rowanbeentje <rowan@beent.je> | 2011-02-14 00:05:14 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-02-14 00:05:14 +0000 |
commit | afad99c5e049e30cbe1ac3e9c4dfce7de28501a1 (patch) | |
tree | e5e3eb9cfaf7a7e9b60423e706fb25cd9d266f53 /Source/SPTableContent.m | |
parent | 352d61bb7de20b1aaafddebb9621ea0ef95f8480 (diff) | |
download | sequelpro-afad99c5e049e30cbe1ac3e9c4dfce7de28501a1.tar.gz sequelpro-afad99c5e049e30cbe1ac3e9c4dfce7de28501a1.tar.bz2 sequelpro-afad99c5e049e30cbe1ac3e9c4dfce7de28501a1.zip |
- When changing column selections in the filter dropdowns, preserve the filter comparison type if possible
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 7 |
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]; |