fix(view): window corner picks exempt from Ortho/Polar (#363)
ZOOM WINDOW's opposite corner was pinned to an axis with Ortho on, collapsing the window to a line. Extend the #291 window_corner_pick exemption to ZOOM WINDOW, PLOTWINDOW and WIPEOUT's rectangular mode (polygon mode keeps the constraints — axis-aligned edges are a legitimate use). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
ea860cab72
commit
9690d37d03
3 changed files with 19 additions and 0 deletions
|
|
@ -107,6 +107,13 @@ impl CadCommand for WipeoutCommand {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn window_corner_pick(&self) -> bool {
|
||||||
|
// Rectangular mode picks free window corners — exempt from Ortho/Polar
|
||||||
|
// (#363/#291 class). Polygon points keep the constraints (axis-aligned
|
||||||
|
// polygon edges are a legitimate use).
|
||||||
|
matches!(self.mode, WipeoutMode::Rectangular)
|
||||||
|
}
|
||||||
|
|
||||||
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
||||||
match &self.mode {
|
match &self.mode {
|
||||||
WipeoutMode::Rectangular => {
|
WipeoutMode::Rectangular => {
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,11 @@ impl CadCommand for PlotWindowCommand {
|
||||||
CmdResult::Cancel
|
CmdResult::Cancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn window_corner_pick(&self) -> bool {
|
||||||
|
// Free rectangle corners — exempt from Ortho/Polar (#363/#291 class).
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
||||||
let p1 = self.p1?.as_vec3();
|
let p1 = self.p1?.as_vec3();
|
||||||
// Draw the selection rectangle.
|
// Draw the selection rectangle.
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,13 @@ impl CadCommand for ZoomWindowCommand {
|
||||||
CmdResult::Cancel
|
CmdResult::Cancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn window_corner_pick(&self) -> bool {
|
||||||
|
// Both zoom-window corners are free points; Ortho/Polar must not pin
|
||||||
|
// the opposite corner to an axis or the window collapses to a line
|
||||||
|
// (#363, same class as #291).
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
fn on_mouse_move(&mut self, pt: DVec3) -> Option<WireModel> { let pt = pt.as_vec3();
|
||||||
let p1 = self.first?;
|
let p1 = self.first?;
|
||||||
let min = p1.min(pt);
|
let min = p1.min(pt);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue