Merge pull request #1778 from ramox81/codex/refedit-toolbar

REFEDIT session toolbar: definition name, working set count and REFSET buttons
This commit is contained in:
Hakan Seven committed 2026-10-14 12:05:19 +03:00
commit dec3ba2743
29 files changed
+218 -7

No files matched your search

+7 -2
View File
@@ -21,7 +21,7 @@ impl OpenCADStudio {
pub(super) fn dispatch_refedit(&mut self, cmd: &str, i: usize) -> Option<Task<Message>> {
match cmd {
"REFEDIT" | "-REFEDIT" => Some(self.start_refedit(i, cmd == "-REFEDIT")),
"REFSET" => {
"REFSET" | "REFSET_ADD" | "REFSET_REMOVE" => {
if self.tabs[i].refedit_session.is_none() {
self.command_line.push_error(crate::t!(NOT_CHECKED_OUT).as_ref());
return Some(Task::none());
@@ -30,7 +30,12 @@ impl OpenCADStudio {
crate::t!("Transfer objects between the RefEdit working set and host drawing...")
.as_ref(),
);
let command = RefSetCommand::new();
// The side toolbar's Add / Remove go straight to the selection.
let command = match cmd {
"REFSET_ADD" => RefSetCommand::selecting(true),
"REFSET_REMOVE" => RefSetCommand::selecting(false),
_ => RefSetCommand::new(),
};
use crate::command::CadCommand;
self.command_line.push_info(&command.prompt());
self.tabs[i].active_cmd = Some(Box::new(command));