REFEDIT session toolbar: definition name, working set count, REFSET

The right-edge toolbar of a REFEDIT session now shows the definition
being edited (REFEDITNAME) as an accent pill with the number of objects
in the working set, Add to / Remove from Working Set buttons with their
own icons (REFSET Add / Remove, straight to object selection), and
Save / Discard in a separate group below a rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-14 10:51:22 +03:00
1 parent 592289f4fd
commit 74d65c26be
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));