fix: hide sheet viewport border and improve crossing selection
Two layout-related fixes: 1. Sheet viewport (id=1) was rendered as a grey rectangle border in paper-space layouts. It is the paper boundary, not a user viewport, and should not appear. Now filtered via is_content_viewport() before tessellation. The redundant id==1 color branch is removed. 2. Box crossing-selection (right-to-left drag) only detected wires whose vertex points fell inside the selection box. Large entities like viewport frames could be visually crossed without any corner inside the box and would not be selected. Added segment-box edge intersection tests so any wire segment that crosses the selection rectangle boundary is included. Fixes part of #10 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c0ee0d6edc
commit
ebef467720
2 changed files with 24 additions and 4 deletions
|
|
@ -3084,12 +3084,15 @@ fn tessellate_entity(
|
|||
let sel = selected.contains(&h);
|
||||
|
||||
if let EntityType::Viewport(vp) = e {
|
||||
// The sheet viewport (overall/id=1) is never shown — it represents the
|
||||
// paper boundary, not a user-defined content window.
|
||||
if !Scene::is_content_viewport(vp) {
|
||||
return vec![];
|
||||
}
|
||||
let is_active = active_viewport == Some(h);
|
||||
let is_locked = vp.status.locked;
|
||||
let color = if sel && vp.id != 1 {
|
||||
let color = if sel {
|
||||
[1.0, 1.0, 1.0, 1.0]
|
||||
} else if vp.id == 1 {
|
||||
[0.40, 0.40, 0.40, 1.0]
|
||||
} else if is_active {
|
||||
[1.0, 0.90, 0.20, 1.0]
|
||||
} else if is_locked {
|
||||
|
|
|
|||
Loading…
Reference in a new issue