forked from 1b-agent/opencadstudio-upstream
Fix ribbon active state, polar snap, FILLET pick mode, and arc preview plane
- Deactivate ribbon tool highlight when command ends (issue #1) - Reset last_point on new command dispatch to fix polar snap offset (issue #2) - FILLET/CHAMFER: disable text input during entity pick so clicks reach viewport (issue #3) - Dropdown icon buttons now use RibbonToolClick so they highlight blue when active - FILLET/CHAMFER: AutoCAD-style sub-step UX — typing R/D + Enter prompts for value - Fix FILLET arc preview plane: arc was rendering in XZ instead of XY - Bump version to 0.1.1 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
468633c1fe
commit
a88542a69a
6 files changed
+162
-44
No files matched your search
@@ -103,6 +103,9 @@ impl Ribbon {
|
||||
pub fn activate_tool(&mut self, id: &str) {
|
||||
self.active_tool = Some(id.to_string());
|
||||
}
|
||||
pub fn deactivate_tool(&mut self) {
|
||||
self.active_tool = None;
|
||||
}
|
||||
pub fn set_wireframe(&mut self, w: bool) {
|
||||
self.wireframe = w;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,10 @@ pub(super) fn render_small<'a>(
|
||||
let tip_text = format!("{}\nCommand: {}", cur_label, last);
|
||||
|
||||
let icon_btn = button(make_icon(cur_icon, SMALL_ICON))
|
||||
.on_press(Message::Command(last.to_string()))
|
||||
.on_press(Message::RibbonToolClick {
|
||||
tool_id: last.to_string(),
|
||||
event: ModuleEvent::Command(last.to_string()),
|
||||
})
|
||||
.style(move |_: &Theme, status| tool_btn_style(active, status))
|
||||
.width(Length::Fixed(SMALL_W))
|
||||
.height(ROW_H)
|
||||
@@ -332,7 +335,10 @@ pub(super) fn render_large<'a>(
|
||||
.align_x(iced::Center)
|
||||
.spacing(3),
|
||||
)
|
||||
.on_press(Message::Command(last.to_string()))
|
||||
.on_press(Message::RibbonToolClick {
|
||||
tool_id: last.to_string(),
|
||||
event: ModuleEvent::Command(last.to_string()),
|
||||
})
|
||||
.style(move |_: &Theme, status| tool_btn_style(active, status))
|
||||
.width(Length::Fixed(LARGE_W))
|
||||
.height(Fill)
|
||||
|
||||
Reference in new issue
Block a user