forked from 1b-agent/fieldcraft-upstream
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:
1 parent
a0ae8b2111
commit
dcf03e3378
5 files changed
+68
-3
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user