A shape you selected whole had nothing left to click

"Still cannot edit labels in rounded rectangles." Reproduced on the rig in a few minutes, and it
is NOT the window-manager defect the rest of this week has been about — it happens on openbox,
where typing into a value field works perfectly. The value was never the problem. The LABEL was
not there.

render_live_quotes picks the entity to speak for like this:

    else if (m_selection.size() == 1)  ei = m_selection[0];
    if (ei < 0 || ...) return;

A rounded rectangle is EIGHT entities — four lines and four arcs — so selecting the shape makes
m_selection.size() == 8 and the pass returns before drawing anything. Its Width, Height and fillet
Radius are live labels and nothing else, so with them gone there is no affordance at all: no
number to click, no field to open, no value to refuse. The rule hid the characteristic quotes for
precisely the shapes that have nothing but characteristic quotes.

A plain rectangle looked fine only by accident. Typing into its auto-edit chain creates a DRIVEN
dimension, which render_dimensions draws from the annotation list, so its labels survive. The
rounded rect's W/H/R go through set_rounded_rect, which rebuilds the geometry and leaves no
annotation behind. Same for slot, arc-slot and polygon: every grouped feature was in this hole.

A selection that is entirely ONE feature now speaks through any member. The switch below already
keys off feature_of(ei) rather than the entity, so nothing else had to change.

Measured on behemoth :10, before and after, same binary path:
  before  8 selected -> no labels at all
  after   8 selected -> R26.6 / 117.4 / 150.7 drawn; clicking R26.6 opens Radius prefilled 26.60;
          typing 8 gives R8.0 mm and visibly sharper corners.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FbJKJAJxxkhDTs9XdZzKA
This commit is contained in:
Tommaso Bianchi
2026-09-06 08:14:44 +02:00
co-authored by Claude Opus 5
parent 00d6c191dc
commit af4bbe0217
+23
View File
@@ -7124,6 +7124,29 @@ void DesignSketchTool::render_live_quotes(double unit_per_px)
if (m_dragging_point && m_drag_ei >= 0) ei = m_drag_ei;
else if (m_dragging_handle) ei = m_drag_handle.ei;
else if (m_selection.size() == 1) ei = m_selection[0];
else if (!m_selection.empty()) {
// A GROUPED FEATURE SELECTS EVERY MEMBER, so "exactly one entity" hid the characteristic
// quotes for precisely the shapes that have nothing else. A rounded rectangle is eight
// entities — four lines and four arcs — so picking it makes m_selection.size() == 8, this
// pass returned here, and its Width / Height / Radius labels were never drawn. With no
// label on screen there is nothing to click, which is the whole of "cannot edit labels in
// rounded rectangles": not a value that refuses to change, a label that does not exist.
//
// A plain rectangle looked fine only by accident: typing into its auto-edit chain creates
// a DRIVEN dimension, and render_dimensions draws that one from the annotation list. The
// rounded rect's W/H/R go through set_rounded_rect, which rebuilds the geometry and leaves
// no annotation behind — so the live label was the only affordance it ever had.
//
// Accept a selection that is entirely ONE feature and let any member speak for it; the
// switch below already keys off feature_of(ei) rather than the entity itself.
const int f0 = feature_of(m_selection.front());
if (f0 >= 0) {
bool same_feature = true;
for (int s : m_selection)
if (feature_of(s) != f0) { same_feature = false; break; }
if (same_feature) ei = m_selection.front();
}
}
if (ei < 0 || ei >= int(m_entities.size())) return;
const SketchEntity& e = m_entities[ei];