mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Sort out the mess around column sorting that had accumulated over time
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user