Commit aa82299f authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

Update toggleHideDead to show dead nodes too

It was hiding the nodes, but never showing them. Therefore it wasn't
'toggling'.

Change-Id: I6fe57860f44ba05abac0f1575678a494f9d07ae8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649557Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Auto-Submit: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62057}
parent c904a467
......@@ -411,7 +411,11 @@ export class GraphView extends PhaseView {
toggleHideDead(view: GraphView) {
view.state.hideDead = !view.state.hideDead;
if (view.state.hideDead) view.hideDead();
if (view.state.hideDead) {
view.hideDead();
} else {
view.showDead();
}
const element = document.getElementById('toggle-hide-dead');
element.classList.toggle('button-input-toggled', view.state.hideDead);
}
......@@ -426,6 +430,15 @@ export class GraphView extends PhaseView {
this.updateGraphVisibility();
}
showDead() {
for (const n of this.graph.nodes()) {
if (!n.isLive()) {
n.visible = true;
}
}
this.updateGraphVisibility();
}
hideUnselectedAction(view: GraphView) {
for (const n of view.graph.nodes()) {
if (!view.state.selection.isSelected(n)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment