Skip to content

Commit

Permalink
Hide self-references (we dont care)
Browse files Browse the repository at this point in the history
  • Loading branch information
cohaereo committed Jun 1, 2024
1 parent 15ecdee commit 7846996
Showing 1 changed file with 17 additions and 34 deletions.
51 changes: 17 additions & 34 deletions src/gui/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,23 +539,22 @@ impl View for TagView {
};

// TODO(cohae): Highlight/jump to tag in hex viewer
let response = ui.add_enabled(
tag.hash.hash32() != self.tag,
egui::SelectableLabel::new(false, tag_label),
);
if response
.tag_context_with_texture(
tag.hash.hash32(),
match tag.hash {
ExtendedTagHash::Hash32(_) => None,
ExtendedTagHash::Hash64(t) => Some(t),
},
&self.texture_cache,
is_texture,
)
.clicked()
{
open_new_tag = Some(tag.hash.hash32());
if tag.hash.hash32() != self.tag {
let response = ui.selectable_label(false, tag_label);
if response
.tag_context_with_texture(
tag.hash.hash32(),
match tag.hash {
ExtendedTagHash::Hash32(_) => None,
ExtendedTagHash::Hash64(t) => Some(t),
},
&self.texture_cache,
is_texture,
)
.clicked()
{
open_new_tag = Some(tag.hash.hash32());
}
}
}
}
Expand Down Expand Up @@ -1186,24 +1185,8 @@ fn traverse_tag(
"{line_header}{branch}──{fancy_tag} @ {offset_label} (parent)"
)
.ok();

// subtags.push(TraversedTag {
// tag: *t,
// entry: Right(format!("Parent")),
// subtags: vec![],
// });
} else if *t == tag {
writeln!(
out,
"{line_header}{branch}──{fancy_tag} @ {offset_label} (self reference)"
)
.ok();

// subtags.push(TraversedTag {
// tag: *t,
// entry: Right(format!("Self reference")),
// subtags: vec![],
// });
// We don't care about self references
} else {
writeln!(
out,
Expand Down

0 comments on commit 7846996

Please sign in to comment.