summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-01-21 14:27:23 +0100
committerDaniel Lange <DLange@git.local>2021-01-21 14:27:23 +0100
commit4531b31d92d23072fa978a3dedcbcab50c936188 (patch)
tree67d1e211d5d0c3d0d747bf7cd676a8a1cc040184 /Settings.c
parentb20bb543ced602748d3d5fad191dda07919be13d (diff)
Sort out the mess around column sorting that had accumulated over time
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Settings.c b/Settings.c
index f252c10d..93e56f97 100644
--- a/Settings.c
+++ b/Settings.c
@@ -330,7 +330,7 @@ Settings* Settings_new(int initialCpuCount) {
this->sortKey = PERCENT_CPU;
this->treeSortKey = PID;
- this->direction = 1;
+ this->direction = -1;
this->treeDirection = 1;
this->shadowOtherUsers = false;
this->showThreadNames = false;
@@ -450,10 +450,10 @@ void Settings_invertSortOrder(Settings* this) {
void Settings_setSortKey(Settings* this, ProcessField sortKey) {
if (this->treeViewAlwaysByPID || !this->treeView) {
this->sortKey = sortKey;
- this->direction = 1;
+ this->direction = (Process_fields[sortKey].defaultSortDesc) ? -1 : 1;
this->treeView = false;
} else {
this->treeSortKey = sortKey;
- this->treeDirection = 1;
+ this->treeDirection = (Process_fields[sortKey].defaultSortDesc) ? -1 : 1;
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy