From cd695f49776bbb98e738b5fe79f8e9f9b8a273d8 Mon Sep 17 00:00:00 2001 From: "Michael X. Grey" Date: Fri, 23 Aug 2024 02:02:27 +0800 Subject: [PATCH] improve tooltips during parent selection Signed-off-by: Michael X. Grey --- .../src/interaction/select/replace_parent_3d.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rmf_site_editor/src/interaction/select/replace_parent_3d.rs b/rmf_site_editor/src/interaction/select/replace_parent_3d.rs index 62d53036..2bf608e8 100644 --- a/rmf_site_editor/src/interaction/select/replace_parent_3d.rs +++ b/rmf_site_editor/src/interaction/select/replace_parent_3d.rs @@ -167,8 +167,6 @@ pub fn replace_parent_3d_find_parent( return; }; - tooltips.add(Cow::Borrowed("Select new parent")); - let object = *order.request(); for s in selected.read() { // Allow users to signal the choice of parent by means other than clicking @@ -225,6 +223,12 @@ pub fn replace_parent_3d_find_parent( hovered = Some(e); } + if hovered.is_some() { + tooltips.add(Cow::Borrowed("Click to select this as the parent")); + } else if !ignore_click { + tooltips.add(Cow::Borrowed("Click to remove parent")); + } + if hovered != hovering.0 { hover.send(Hover(hovered)); }