Merge pull request #1810 from ramox81/codex/insert-import-panel

Insert ribbon: Import panel

# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/lo-LA/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
#	src/modules/insert/mod.rs
#	src/ui/ribbon/draw_panel.rs
This commit is contained in:
Hakan Seven committed 2026-10-15 16:47:38 +03:00
commit 443d3ec13d
33 files changed
+285 -42

No files matched your search

+19
View File
@@ -109,6 +109,25 @@ impl OpenCADStudio {
task
}
/// Run a ribbon command. A `;` stands for Enter, as in a menu macro: each
/// part answers the running command's prompt, or starts a command when
/// none runs (`PDFIMPORT;FILE`).
pub(super) fn dispatch_ribbon_command(&mut self, cmd: &str) -> Task<Message> {
if !cmd.contains(';') {
return self.dispatch_command(cmd);
}
let i = self.active_tab;
let mut tasks = Vec::new();
for part in cmd.split(';') {
tasks.push(if self.tabs[i].active_cmd.is_some() {
self.feed_active_cmd(part)
} else {
self.dispatch_command(part)
});
}
Task::batch(tasks)
}
/// Turn the ribbon highlight off when the command just dispatched left
/// nothing running: no interactive command, dialog or navigation mode.
/// One-shot commands (view changes, clipboard, toggles, audits…) would
+1 -1
View File
@@ -133,7 +133,7 @@ impl OpenCADStudio {
match event {
// `dispatch_command` turns a one-shot tool's highlight off
// again once nothing is left running (#355).
ModuleEvent::Command(cmd) => return self.dispatch_command(&cmd),
ModuleEvent::Command(cmd) => return self.dispatch_ribbon_command(&cmd),
ModuleEvent::OpenFileDialog => {
self.command_line
.push_info(crate::t!("Open DWG/DXF: not yet implemented.").as_ref());
+1 -1
View File
@@ -6704,7 +6704,7 @@ impl OpenCADStudio {
};
self.ribbon.select_dropdown_item(dropdown_id, face);
self.ribbon.activate_tool(cmd);
self.dispatch_command(cmd)
self.dispatch_ribbon_command(cmd)
}
Message::DeleteSelected => {