diff options
author | Miroslav Zoricak <zoricak@udesign.sk> | 2014-03-04 21:25:14 +0100 |
---|---|---|
committer | Miroslav Zoricak <zoricak@udesign.sk> | 2014-03-04 21:25:14 +0100 |
commit | 1941d8487b4b93519d4451941e8cd9ed3de19404 (patch) | |
tree | c95b8ab8e7a286760759c577b076e7ea0f60c4e5 | |
parent | 5c0212a51d21f06f3beb62059b0b17c6ee1d8c91 (diff) | |
download | sequelpro-1941d8487b4b93519d4451941e8cd9ed3de19404.tar.gz sequelpro-1941d8487b4b93519d4451941e8cd9ed3de19404.tar.bz2 sequelpro-1941d8487b4b93519d4451941e8cd9ed3de19404.zip |
Shift-click to reverse sort order of table columns
-rw-r--r-- | Source/SPTableContent.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 433ac25c..11c3d1df 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -1663,7 +1663,13 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } } else { - isDesc = NO; + // When the column is not sorted, allow to sort in reverse order using Shift+click + NSUInteger modifierFlags = [[NSApp currentEvent] modifierFlags]; + if (modifierFlags & NSShiftKeyMask) { + isDesc = YES; + } else { + isDesc = NO; + } [[tableContentView onMainThread] setIndicatorImage:nil inTableColumn:[tableContentView tableColumnWithIdentifier:[NSString stringWithFormat:@"%lld", (long long)[sortCol integerValue]]]]; |