mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-22 08:22:58 +00:00
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:
co-authored by
Claude Opus 5
parent
d5c5d5675e
commit
447c71a0d2
@@ -148,6 +148,8 @@ static const OfferVerb kOfferVerbs[] = {
|
||||
{"sk_poly_inscribed", "Inscribed", 0, nullptr, "btn:polyfit#0", nullptr, 0x000f8000u, 0, 0, false, true, "Polygon"},
|
||||
{"sk_poly_circumscribed", "Circumscribed", 0, nullptr, "btn:polyfit#1", nullptr, 0x000f8000u, 0, 0, false, true, "Polygon"},
|
||||
{"sk_point_t", "Point", 0, "P", "key:P", nullptr, 0x000f8000u, 0, 0, false, true, nullptr},
|
||||
{"sk_text", "Text", 0, nullptr, "btn:text", nullptr, 0x000f8000u, 0, 0, false, true, nullptr},
|
||||
{"sk_svg", "SVG", 0, nullptr, "btn:svg", nullptr, 0x000f8000u, 0, 0, false, true, nullptr},
|
||||
{"sk_offset", "Offset", 1, "O", "key:O", nullptr, 0x000b0000u, 0, 0, false, true, nullptr},
|
||||
{"sk_trim", "Trim", 2, "T", "key:T", nullptr, 0x000b0000u, 0, 0, false, true, nullptr},
|
||||
{"sk_fillet", "Fillet", 3, "F", "key:F", nullptr, 0x00090000u, 0, 0, false, true, nullptr},
|
||||
@@ -164,7 +166,7 @@ static const OfferVerb kOfferVerbs[] = {
|
||||
{"sk_extend", "Extend", 7, "X", "key:X", nullptr, 0x000b0000u, 0, 0, false, true, nullptr},
|
||||
{"sk_delete", "Delete", 7, "Del", "btn:delete", nullptr, 0x000f0000u, 0, 0, false, true, nullptr},
|
||||
};
|
||||
static const int kOfferVerbCount = 84;
|
||||
static const int kOfferVerbCount = 86;
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user