Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
5effb12e
Commit
5effb12e
authored
Nov 24, 2010
by
Hisham Muhammad
Browse files
Fix behavior of expand/collapse-tree. Thanks Rob for the heads up!
parent
941ad72f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ProcessList.c
View file @
5effb12e
...
...
@@ -257,7 +257,6 @@ static void ProcessList_buildTree(ProcessList* this, pid_t pid, int level, int i
Process
*
process
=
(
Process
*
)
(
Vector_get
(
children
,
i
));
if
(
!
show
)
process
->
show
=
false
;
show
=
show
?
process
->
showChildren
:
false
;
int
s
=
this
->
processes2
->
items
;
if
(
direction
==
1
)
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
);
assert
(
this
->
processes2
->
items
==
s
+
1
);
(
void
)
s
;
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
;
}
Vector_delete
(
children
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment