Skip to content

Commit

Permalink
debug_ui: Fix summary of objects without a name
Browse files Browse the repository at this point in the history
Without this patch, Ruffle was displaying empty labels
for objects without a name.
  • Loading branch information
kjarosh committed Jan 26, 2025
1 parent e68837e commit 9327d74
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/src/debug_ui/display_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1398,13 +1398,9 @@ fn summary_name(object: DisplayObject) -> Cow<'static, str> {
let name = object.name();

if let Some(name) = name {
if name.is_empty() {
Cow::Borrowed(do_type)
} else {
Cow::Owned(format!("{do_type} \"{name}\""))
}
Cow::Owned(format!("{do_type} \"{name}\""))
} else {
Cow::Borrowed("")
Cow::Borrowed(do_type)
}
}

Expand Down

0 comments on commit 9327d74

Please # to comment.