mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-05 23:01:17 +00:00
Show feature and body actions on their rows in the Design sidebar
Each Feature tree row now carries Edit, Show/hide and Delete, and each Bodies row carries Move, Show/hide and Delete. These act on that row instead of on the selection. The eye shows a closed eye when the item is hidden. Every clickable icon in the sidebar now highlights on hover. Rename and Color now come first in the right-click menu, as items of their own instead of inside Modify. This applies wherever they appear, whether opened from the viewport or from a Bodies row. Clicking an already-selected row no longer starts a rename; use F2, the row's right-click menu, or the Rename command.
This commit is contained in:
@@ -114,7 +114,7 @@ def main():
|
||||
"struct OfferVerb {",
|
||||
" const char* id;",
|
||||
" const char* name; // drawing-office word (L10); marked L(); translated at use",
|
||||
" int row; // 0..7, the ratified index — NEVER reorder",
|
||||
" int row; // index into kOfferRowNames, the ratified address — NEVER reorder",
|
||||
" const char* key; // shortcut shown in the row, or nullptr",
|
||||
" const char* action;",
|
||||
" const char* refusal; // why this row is greyed, in the product's own words",
|
||||
@@ -135,11 +135,20 @@ def main():
|
||||
"// Row labels, in ratified order.",
|
||||
"static const char* const kOfferRowNames[] = {",
|
||||
]
|
||||
# A flat row's label is never shown, so it is not marked for translation.
|
||||
for s in A["slots"]:
|
||||
lines.append(f' {tstr(s["label"])},')
|
||||
lines.append(f' {cstr(s["label"]) if s.get("flat") else tstr(s["label"])},')
|
||||
lines += [
|
||||
"};",
|
||||
f"static const int kOfferRowCount = {len(slots)};",
|
||||
"// A flat row is not a family: its verbs come first, at the top level of the offer, each",
|
||||
"// an item of its own.",
|
||||
"static const bool kOfferRowFlat[] = {",
|
||||
]
|
||||
for s in A["slots"]:
|
||||
lines.append(f' {"true" if s.get("flat") else "false"},')
|
||||
lines += [
|
||||
"};",
|
||||
"",
|
||||
"static const OfferVerb kOfferVerbs[] = {",
|
||||
]
|
||||
|
||||
@@ -67,6 +67,12 @@
|
||||
"angle": 225,
|
||||
"label": "Modify",
|
||||
"why": "edits or removes what is already there"
|
||||
},
|
||||
{
|
||||
"id": "top",
|
||||
"label": "Top",
|
||||
"flat": true,
|
||||
"why": "the verbs a selection is opened for most. A flat slot is not a family: its verbs sit first, at the top level of the offer, each an item of its own, and its label is never shown. Appended last, so no ratified index moved."
|
||||
}
|
||||
],
|
||||
"selections": [
|
||||
@@ -1044,7 +1050,7 @@
|
||||
{
|
||||
"id": "rename",
|
||||
"name": "Rename…",
|
||||
"slot": "modify",
|
||||
"slot": "top",
|
||||
"key": "F2",
|
||||
"feature": "Tree",
|
||||
"mcp": null,
|
||||
@@ -1084,7 +1090,7 @@
|
||||
{
|
||||
"id": "colour",
|
||||
"name": "Color",
|
||||
"slot": "modify",
|
||||
"slot": "top",
|
||||
"key": null,
|
||||
"feature": null,
|
||||
"mcp": null,
|
||||
|
||||
Reference in New Issue
Block a user