From d6030a16b3d473d9991af62c54f4157de46a961d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 27 Feb 2019 19:34:14 +0100 Subject: [PATCH] sculpt: tweaks for the component graph - Hide depot_rom and dynamic_depot_rom - Reset selection when removing the selected component --- repos/gems/src/app/sculpt_manager/graph.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/repos/gems/src/app/sculpt_manager/graph.h b/repos/gems/src/app/sculpt_manager/graph.h index 7660d02ff..67369da1a 100644 --- a/repos/gems/src/app/sculpt_manager/graph.h +++ b/repos/gems/src/app/sculpt_manager/graph.h @@ -131,6 +131,8 @@ struct Sculpt::Graph /* omit sculpt's helpers from the graph */ bool const blacklisted = (name == "runtime_view" || name == "launcher_query" + || name == "depot_rom" + || name == "dynamic_depot_rom" || name == "depot_query"); if (blacklisted) return; @@ -176,6 +178,17 @@ struct Sculpt::Graph if (show_details) { component.for_each_secondary_dep([&] (Start_name const &dep) { + + /* + * Connections to depot_rom do not reveal any + * interesting information but create a lot of + * noise. + */ + bool const blacklisted = (dep == "depot_rom") + || (dep == "dynamic_depot_rom"); + if (blacklisted) + return; + xml.node("dep", [&] () { xml.attribute("node", name); xml.attribute("on", dep); @@ -284,9 +297,17 @@ struct Sculpt::Graph _remove_item.confirm_activation_on_clack(); - if (_remove_item.activated("remove")) + if (_remove_item.activated("remove")) { action.remove_deployed_component(_runtime_state.selected()); + /* + * Unselect the removed component to bring graph into + * default state. + */ + _runtime_state.toggle_selection(_runtime_state.selected(), + _runtime_config); + } + } else { _remove_item.reset(); }