mirror of https://github.com/xzeldon/htop.git
Fix behavior of expand/collapse-tree. Thanks Rob for the heads up!
This commit is contained in:
parent
941ad72f67
commit
5effb12e46
|
@ -257,7 +257,6 @@ static void ProcessList_buildTree(ProcessList* this, pid_t pid, int level, int i
|
||||||
Process* process = (Process*) (Vector_get(children, i));
|
Process* process = (Process*) (Vector_get(children, i));
|
||||||
if (!show)
|
if (!show)
|
||||||
process->show = false;
|
process->show = false;
|
||||||
show = show ? process->showChildren : false;
|
|
||||||
int s = this->processes2->items;
|
int s = this->processes2->items;
|
||||||
if (direction == 1)
|
if (direction == 1)
|
||||||
Vector_add(this->processes2, process);
|
Vector_add(this->processes2, process);
|
||||||
|
@ -265,7 +264,7 @@ static void ProcessList_buildTree(ProcessList* this, pid_t pid, int level, int i
|
||||||
Vector_insert(this->processes2, 0, process);
|
Vector_insert(this->processes2, 0, process);
|
||||||
assert(this->processes2->items == s+1); (void)s;
|
assert(this->processes2->items == s+1); (void)s;
|
||||||
int nextIndent = indent | (1 << level);
|
int nextIndent = indent | (1 << level);
|
||||||
ProcessList_buildTree(this, process->pid, level+1, (i < size - 1) ? nextIndent : indent, direction, show);
|
ProcessList_buildTree(this, process->pid, level+1, (i < size - 1) ? nextIndent : indent, direction, show ? process->showChildren : false);
|
||||||
process->indent = nextIndent;
|
process->indent = nextIndent;
|
||||||
}
|
}
|
||||||
Vector_delete(children);
|
Vector_delete(children);
|
||||||
|
|
Loading…
Reference in New Issue