Reset glyph to archetype default when selection changes
Selecting a different archetype in the editor now updates the active glyph to that archetype's default_glyph(), keeping the visual preview in sync with the selected behavior type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -175,11 +175,13 @@ impl eframe::App for App {
|
|||||||
}
|
}
|
||||||
if cell_resp.clicked() {
|
if cell_resp.clicked() {
|
||||||
self.editor.selected = archetype;
|
self.editor.selected = archetype;
|
||||||
|
self.editor.glyph = archetype.default_glyph();
|
||||||
}
|
}
|
||||||
if ui.selectable_label(is_selected, archetype.name())
|
if ui.selectable_label(is_selected, archetype.name())
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
self.editor.selected = archetype;
|
self.editor.selected = archetype;
|
||||||
|
self.editor.glyph = archetype.default_glyph();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user