forked from 1b-agent/opencadstudio-upstream
fix(layout): focus inline rename field on RENAME
Renaming a layout tab left keyboard focus on the command line, so typed characters landed there until the user clicked the tab. Give the inline rename text_input a stable id and return a focus task when the rename starts so the user types straight into the field. (issue #86) Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
dc26c8128c
commit
cd4d1c2535
2 files changed
+10
No files matched your search
@@ -5103,6 +5103,11 @@ impl OpenCADStudio {
|
||||
if name != "Model" {
|
||||
self.layout_rename_state = Some((name.clone(), name));
|
||||
self.layout_context_menu = None;
|
||||
// Focus the inline field so the user types into it
|
||||
// directly instead of the command line (issue #86).
|
||||
return iced::widget::operation::focus(iced::widget::Id::new(
|
||||
crate::ui::statusbar::LAYOUT_RENAME_INPUT_ID,
|
||||
));
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user