From a451095bda3495623429227541dfe1acb1389fbf Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 5 Aug 2026 23:22:18 +0200 Subject: [PATCH 1/2] Proposal for fixing issue #2407 --- src/edt/edt/edtPartialService.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edt/edt/edtPartialService.cc b/src/edt/edt/edtPartialService.cc index a4bcf58b2..a088e8107 100644 --- a/src/edt/edt/edtPartialService.cc +++ b/src/edt/edt/edtPartialService.cc @@ -1962,7 +1962,7 @@ PartialService::mouse_press_event (const db::DPoint &p, unsigned int buttons, bo m_p1 = p; m_p2 = p; mp_box = new lay::RubberBox (ui (), m_color, p, p); - mp_box->set_stipple (6); // coarse hatched + mp_box->set_stipple (2); // small checkerboard ui ()->grab_mouse (this, true); From e72c08ef3f9074cf74d81c31daba3eb6dfc7543c Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 6 Aug 2026 20:57:45 +0200 Subject: [PATCH 2/2] dash-dotted for partial select --- src/edt/edt/edtPartialService.cc | 2 +- src/laybasic/laybasic/layRubberBox.cc | 10 +++++----- src/laybasic/laybasic/layRubberBox.h | 4 ++-- src/laybasic/laybasic/laySelector.cc | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/edt/edt/edtPartialService.cc b/src/edt/edt/edtPartialService.cc index a088e8107..4751c0523 100644 --- a/src/edt/edt/edtPartialService.cc +++ b/src/edt/edt/edtPartialService.cc @@ -1962,7 +1962,7 @@ PartialService::mouse_press_event (const db::DPoint &p, unsigned int buttons, bo m_p1 = p; m_p2 = p; mp_box = new lay::RubberBox (ui (), m_color, p, p); - mp_box->set_stipple (2); // small checkerboard + mp_box->set_line_style (3); // long dashed dotted ui ()->grab_mouse (this, true); diff --git a/src/laybasic/laybasic/layRubberBox.cc b/src/laybasic/laybasic/layRubberBox.cc index f2f6ae748..dd1e7b2d0 100644 --- a/src/laybasic/laybasic/layRubberBox.cc +++ b/src/laybasic/laybasic/layRubberBox.cc @@ -34,7 +34,7 @@ namespace lay RubberBox::RubberBox (lay::ViewObjectUI *widget, unsigned int color, const db::DPoint &p1, const db::DPoint &p2) : lay::ViewObject (widget, false /*not static*/), - m_p1 (p1), m_p2 (p2), m_color (color), m_stipple (0) + m_p1 (p1), m_p2 (p2), m_color (color), m_line_style (0) { } void @@ -47,10 +47,10 @@ RubberBox::set_color (unsigned int color) } void -RubberBox::set_stipple (unsigned int s) +RubberBox::set_line_style (unsigned int s) { - if (m_stipple != s) { - m_stipple = s; + if (m_line_style != s) { + m_line_style = s; redraw (); } } @@ -60,7 +60,7 @@ RubberBox::render (const Viewport &vp, ViewObjectCanvas &canvas) { lay::Renderer &r = canvas.renderer (); int lw = int (0.5 + 1.0 / r.resolution ()); - lay::CanvasPlane *plane = canvas.plane (lay::ViewOp (m_color, lay::ViewOp::Copy, 0, m_stipple, 0, lay::ViewOp::Rect, lw)); + lay::CanvasPlane *plane = canvas.plane (lay::ViewOp (m_color, lay::ViewOp::Copy, m_line_style, 0, 0, lay::ViewOp::Rect, lw)); if (plane) { r.draw (vp.trans () * db::DBox (m_p1, m_p2), 0, plane, 0, 0); } diff --git a/src/laybasic/laybasic/layRubberBox.h b/src/laybasic/laybasic/layRubberBox.h index ed831238e..79f4c24fe 100644 --- a/src/laybasic/laybasic/layRubberBox.h +++ b/src/laybasic/laybasic/layRubberBox.h @@ -37,7 +37,7 @@ class LAYBASIC_PUBLIC RubberBox RubberBox (lay::ViewObjectUI *canvas, unsigned int color, const db::DPoint &p1, const db::DPoint &p2); void set_color (unsigned int color); - void set_stipple (unsigned int s); + void set_line_style (unsigned int s); void set_points (const db::DPoint &begin, const db::DPoint &end); private: @@ -45,7 +45,7 @@ class LAYBASIC_PUBLIC RubberBox db::DPoint m_p1, m_p2; unsigned int m_color; - unsigned int m_stipple; + unsigned int m_line_style; }; } diff --git a/src/laybasic/laybasic/laySelector.cc b/src/laybasic/laybasic/laySelector.cc index 287dab404..9e376476a 100644 --- a/src/laybasic/laybasic/laySelector.cc +++ b/src/laybasic/laybasic/laySelector.cc @@ -311,7 +311,7 @@ SelectionService::begin (const db::DPoint &pos) m_p1 = pos; m_p2 = pos; mp_box = new lay::RubberBox (ui (), m_color, pos, pos); - mp_box->set_stipple (6); // coarse hatched + mp_box->set_line_style (4); // short dashed ui ()->grab_mouse (this, true); }