1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 23:13:13 -04:00

Fix drag-drop and simplification code

This commit is contained in:
Emil Ernerfeldt
2023-04-24 17:04:10 +02:00
parent ce7ed11542
commit 13ec65cf08
5 changed files with 153 additions and 49 deletions

View File

@@ -12,5 +12,5 @@ publish = false
eframe = { path = "../../crates/eframe", features = [
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] }
egui_extras = { path = "../../crates/egui_extras", features = ["log"] }
egui_extras = { path = "../../crates/egui_extras" }
env_logger = "0.10"

View File

@@ -109,7 +109,12 @@ fn tree_ui(
// return;
// }
egui::CollapsingHeader::new(behavior.tab_text_for_node(nodes, node_id))
let text = format!(
"{} - {node_id:?}",
behavior.tab_text_for_node(nodes, node_id).text()
);
egui::CollapsingHeader::new(text)
.id_source((node_id, "tree"))
.default_open(true)
.show(ui, |ui| match node {