forked from 1b-agent/opencadstudio-upstream
feat(xref): row-level context menu actions and unified split-button toolbar
Right-click actions bound to the row under the cursor, split-button toolbar groups with shared borders and hover states, and a notice when an operation needs a selection first.
This commit is contained in:
1 parent
494a872e8d
commit
22a9bd602c
28 files changed
+352
-168
No files matched your search
+23
-6
@@ -2192,6 +2192,25 @@ impl OpenCADStudio {
|
||||
self.xref_col_last = None;
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefSplitGrab => {
|
||||
self.xref_split_drag = true;
|
||||
self.xref_col_last = None;
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefSplitMove(p) => {
|
||||
if self.xref_split_drag {
|
||||
if let Some(last) = self.xref_col_last {
|
||||
self.xref_manager.drag_table_by(p.y - last.y);
|
||||
}
|
||||
self.xref_col_last = Some(p);
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefSplitRelease => {
|
||||
self.xref_split_drag = false;
|
||||
self.xref_col_last = None;
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefManagerTogglePreview => {
|
||||
self.xref_manager.show_preview ^= true;
|
||||
Task::none()
|
||||
@@ -2284,12 +2303,10 @@ impl OpenCADStudio {
|
||||
self.xref_manager_op(op);
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefManagerPathInput(text) => {
|
||||
self.xref_manager.path_input = text;
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefManagerPathApply => {
|
||||
self.xref_manager_path_apply();
|
||||
Message::XrefRowOp(index, op) => {
|
||||
// Row-scoped op: select the row first, then run the op.
|
||||
self.xref_manager.right_click_select(index);
|
||||
self.xref_manager_op(op);
|
||||
Task::none()
|
||||
}
|
||||
Message::XrefFindReplacePrompt => {
|
||||
|
||||
Reference in new issue
Block a user