Skip to content

Commit

Permalink
improve tooltips during parent selection
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
  • Loading branch information
mxgrey committed Aug 22, 2024
1 parent 035c5f5 commit cd695f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rmf_site_editor/src/interaction/select/replace_parent_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit cd695f4

Please sign in to comment.