ui: Rename… in a definition's item menu; the selection follows the new name (#290)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 10:17:28 -04:00
1 parent a0ae8b2111
commit dcf03e3378
5 files changed
+68 -3

No files matched your search

+20
View File
@@ -190,6 +190,26 @@ impl Def {
Def::Partition,
];
/// The kind `model.rename` takes for it; `None` for a partition (its cut faces are named
/// after it).
pub fn rename_kind(self) -> Option<&'static str> {
Some(match self {
Def::Set => "set",
Def::Material => "material",
Def::Section => "section",
Def::Step => "step",
Def::BoundaryCondition => "boundary_condition",
Def::Load => "load",
Def::ReferencePoint => "reference_point",
Def::Coupling => "coupling",
Def::Contact => "contact",
Def::Tie => "tie",
Def::FluidDomain => "fluid_domain",
Def::Datum => "datum",
Def::Partition => return None,
})
}
/// The kind of setup symbols a definition of this kind draws, if any.
pub fn symbols(self) -> Option<fieldcraft_render::glyphs::Definition> {
use fieldcraft_render::glyphs::Definition;