Design: Text and SVG join Create — they were excluded on a premise that is not true

Mirror of snaporca 6724ea27c5 (DesignPanel.cpp applied as a patch; parity 30, shared files
byte-identical).

chrome_only's rule is "acts on the DOCUMENT, not on a selection". Text and SVG both call
add_imported_sketch(), which drops the art on a picked solid face via
SketchPlane::from_face() — a selection-consuming profile creator, like Sketch. Now
sk_text / sk_svg in the sketch half's Create row, where their toolbar buttons already sit.

Verified on the rig: Create ends Point, Text, SVG.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
Tommaso Bianchi
2026-08-01 17:14:13 +02:00
co-authored by Claude Opus 5
parent d5c5d5675e
commit 447c71a0d2
3 changed files with 51 additions and 4 deletions
+7
View File
@@ -1176,6 +1176,13 @@ DesignPanel::DesignPanel(wxWindow* parent)
auto* b_svg = icon_btn("design_svg", _L("SVG — import an outline as a profile"));
b_svg->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { on_import_svg(); });
sadd(b_svg);
// …and reachable from the offer's Create row. These were on the atlas's chrome_only
// list under "document-level actions act on the DOCUMENT, not on a selection" — which
// is not what they do: both call add_imported_sketch(), which drops the art ON a
// picked solid face (SketchPlane::from_face, centred on it) exactly as Sketch does.
// Selection-consuming profile creators, so they belong with the other Create verbs.
m_verb_actions["btn:text"] = [this] { on_add_text(); };
m_verb_actions["btn:svg"] = [this] { on_import_svg(); };
}
add_sep(m_tb_sketch);
// In-canvas edit-op tools (drag gizmo / click label), grouped by family.