From bea04da5c2c584cf13907c266629ab90321f8ce1 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 16 Nov 2026 23:07:03 +0100 Subject: [PATCH] Trim nearby duplicate export and workspace menu routes --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/canvas-pilot/src/gui.rs | 21 +++++++++++++-------- crates/canvas-pilot/src/menu_ui.rs | 2 +- crates/canvas-pilot/src/project_ui.rs | 19 ------------------- docs/canvas-pilot/changelog.md | 12 ++++++++++++ docs/canvas-pilot/guide/files.md | 2 +- docs/canvas-pilot/guide/fr/quickstart.md | 2 +- docs/canvas-pilot/guide/preferences.md | 6 +++++- docs/canvas-pilot/guide/quickstart.md | 2 +- docs/canvas-pilot/images/capture.md | 2 +- docs/canvas-pilot/introduction.md | 2 +- 12 files changed, 38 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce118eb..e90b4c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -548,7 +548,7 @@ dependencies = [ [[package]] name = "canvas-pilot" -version = "0.9.14" +version = "0.9.15" dependencies = [ "base64", "craft-dwg", diff --git a/Cargo.toml b/Cargo.toml index 9887c8f..153be0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"] resolver = "3" [workspace.package] -version = "0.9.14" +version = "0.9.15" edition = "2024" license = "MIT" repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot" diff --git a/crates/canvas-pilot/src/gui.rs b/crates/canvas-pilot/src/gui.rs index c474e1a..8aa9935 100644 --- a/crates/canvas-pilot/src/gui.rs +++ b/crates/canvas-pilot/src/gui.rs @@ -2284,6 +2284,19 @@ impl Editor { } fn layer_context_menu(&mut self, ui: &mut egui::Ui) { + self.layer_editing_menu(ui); + let selected = self.layout.selected_indices(); + if !selected.is_empty() || self.layer_ui.context_layer.is_some() { + ui.separator(); + ui.menu_button(tr(ui.ctx(), "ui.canvas"), |ui| { + self.canvas_context_options(ui) + }); + } else { + self.canvas_context_options(ui); + } + } + + fn layer_editing_menu(&mut self, ui: &mut egui::Ui) { ui.set_min_width(210.0); if let Some(id) = self.layer_ui.context_layer { self.layer_organize_menu(ui, id); @@ -2392,14 +2405,6 @@ impl Editor { if let Some(id) = self.layer_ui.context_layer { self.layer_delete_menu(ui, id); } - if !selected.is_empty() || self.layer_ui.context_layer.is_some() { - ui.separator(); - ui.menu_button(tr(ui.ctx(), "ui.canvas"), |ui| { - self.canvas_context_options(ui) - }); - } else { - self.canvas_context_options(ui); - } } fn crop_mask_menu(&mut self, ui: &mut egui::Ui, i: usize) { diff --git a/crates/canvas-pilot/src/menu_ui.rs b/crates/canvas-pilot/src/menu_ui.rs index d90d409..1141dac 100644 --- a/crates/canvas-pilot/src/menu_ui.rs +++ b/crates/canvas-pilot/src/menu_ui.rs @@ -395,7 +395,7 @@ impl Editor { if self.layout.selected_indices().is_empty() { ui.weak(tr(ui.ctx(), "ui.select-a-layer-to-edit-its-properties")); } - self.layer_context_menu(ui); + self.layer_editing_menu(ui); }); ui.separator(); for i in 0..self.layout.layers().len() { diff --git a/crates/canvas-pilot/src/project_ui.rs b/crates/canvas-pilot/src/project_ui.rs index 4c45ffa..9073ab2 100644 --- a/crates/canvas-pilot/src/project_ui.rs +++ b/crates/canvas-pilot/src/project_ui.rs @@ -404,25 +404,6 @@ impl Editor { self.save_project_as(); } ui.small(tr(ui.ctx(), "ui.saves-applied-values-and-reference-images")); - ui.separator(); - if ui - .add_enabled( - self.device.online(), - egui::Button::new(tr(ui.ctx(), "ui.device-mapping-transfer")), - ) - .on_hover_text(tr( - ui.ctx(), - "ui.map-editor-layers-review-device-changes-and-send-explicitly", - )) - .on_disabled_hover_text( - "Read the device connection first; layers can be chosen in the review.", - ) - .clicked() - { - self.open_device_export(); - ui.close(); - } - ui.menu_button(tr(ui.ctx(), "ui.export"), |ui| self.export_menu(ui)); } pub(super) fn export_menu(&mut self, ui: &mut egui::Ui) { self.device_scope_picker(ui); diff --git a/docs/canvas-pilot/changelog.md b/docs/canvas-pilot/changelog.md index 2ab4dce..5520ffd 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -4,6 +4,18 @@ ## Unreleased +### v0.9.15 + +- Removed nested Export and duplicate device mapping/transfer entries from Project; + use Menu → Export or the bottom transfer controls. Project keeps file lifecycle + and recovery actions. +- Removed workspace Canvas controls from Menu → Layers → Selected-layer actions, + where View and Options already provide them. Right-click Canvas controls remain. + Reviewed toolbar, main, layer, reference and device menus; retained direct toolbar + shortcuts and contextual duplicates that save navigation. +- Native Project, Export, selected-layer and right-click menus verified. Required + validation passed; whole-application line coverage is 91.60%. + ### v0.9.14 - Removed the duplicate Open all settings entry from Menu → Options. Full settings diff --git a/docs/canvas-pilot/guide/files.md b/docs/canvas-pilot/guide/files.md index 49fe596..b16d613 100644 --- a/docs/canvas-pilot/guide/files.md +++ b/docs/canvas-pilot/guide/files.md @@ -203,7 +203,7 @@ undo history. Existing files require confirmation before replacement. The [starter-file catalog](../../templates/canvas-pilot/catalog.md) contains all eleven exchange formats, with two layers for 1920 × 1080 and 3840 × 2160 canvases. -**Project → Export → Export layers…** opens one shared window: +**Menu → Export → Export layers…** opens one shared window: 1. Choose the **Format**. 2. Choose **Layers**: Selected layers, All layers, Visible layers only, or Specific diff --git a/docs/canvas-pilot/guide/fr/quickstart.md b/docs/canvas-pilot/guide/fr/quickstart.md index 7beee07..9b0bab5 100644 --- a/docs/canvas-pilot/guide/fr/quickstart.md +++ b/docs/canvas-pilot/guide/fr/quickstart.md @@ -92,7 +92,7 @@ Utilisez **Projet → Ouvrir un projet…** pour le charger ultérieurement. ## 5. Exporter la géométrie des calques -Choisissez **Projet → Exporter → Exporter les calques…**, sélectionnez **SVG** et +Choisissez **Menu → Exporter → Exporter les calques…**, sélectionnez **SVG** et **Tous les calques**, puis cliquez sur **Exporter…** et enregistrez le fichier. Pour exporter uniquement les rectangles des calques, laissez désactivées les images d’arrière-plan et les images de substitution. Le SVG peut être ouvert dans un éditeur vectoriel. diff --git a/docs/canvas-pilot/guide/preferences.md b/docs/canvas-pilot/guide/preferences.md index 93cca51..5d2a767 100644 --- a/docs/canvas-pilot/guide/preferences.md +++ b/docs/canvas-pilot/guide/preferences.md @@ -7,7 +7,8 @@ The header’s **Menu** brings the application’s commands together: - **Open all settings…**: the full preferences window. -- **Project**: open/save JSON and export SVG. +- **Project**: new/open/save projects and restore parameters from exports. +- **Export**: device mapping/transfers and the file export window. - **Import**: SVG, clipboard layer values, and reference images. - **Edit**: undo/redo, copy values, select all editable layers, or deselect. - **View**: fit screen/selection, 1:1 pixels, output format, and reference settings. @@ -19,6 +20,9 @@ The header’s **Menu** brings the application’s commands together: The toolbar, cog and right-click shortcuts use the same commands and preferences. The standalone cog also provides **Open all settings…** above its quick controls. +Project no longer repeats Export or device transfers. Selected-layer actions in +Menu contain layer editing only; workspace controls remain under View and Options. +The canvas right-click menu keeps its Canvas group for access beside the pointer. Detailed numeric controls remain in their existing properties dialogs. Enable **Options → Show toolbar icon names** (also available from the toolbar cog) diff --git a/docs/canvas-pilot/guide/quickstart.md b/docs/canvas-pilot/guide/quickstart.md index e339fe0..580fdd8 100644 --- a/docs/canvas-pilot/guide/quickstart.md +++ b/docs/canvas-pilot/guide/quickstart.md @@ -60,7 +60,7 @@ Use **Project → Open project…** to load it later. ## 5. Export the layer geometry -Choose **Project → Export → Export layers…**, select **SVG** and **All layers**, +Choose **Menu → Export → Export layers…**, select **SVG** and **All layers**, then click **Export…** and save the file. For plain layer boxes, leave the background and placeholder pictures disabled. The SVG can be opened in a vector editor. diff --git a/docs/canvas-pilot/images/capture.md b/docs/canvas-pilot/images/capture.md index abbd3b8..a387191 100644 --- a/docs/canvas-pilot/images/capture.md +++ b/docs/canvas-pilot/images/capture.md @@ -115,7 +115,7 @@ client window. XTest pointer events operated only the isolated session. | `05-guide-layer-properties.png` | Click the selected layer's resolution card and leave the Layer tab open. | | `06-guide-crop.png` | Switch to Crop; retain normal fit, 100% zoom and zero offsets. | | `07-guide-mask.png` | Switch to Mask, then drag the left magenta edge inward about 61 display pixels (116.19 output pixels). Keep the layer bounds unchanged. | -| `08-guide-export.png` | Start a clean session with Presenter selected; open Project → Export → Export layers. Leave SVG, Selected layers, and both optional groups collapsed at their defaults. | +| `08-guide-export.png` | Start a clean session with Presenter selected; open Menu → Export → Export layers. Leave SVG, Selected layers, and both optional groups collapsed at their defaults. | | `09-guide-settings.png` | Close export; open the toolbar settings cog → Open all settings. Leave Appearance selected. | | `10-guide-grid.png` | With Slides selected and other dialogs closed, open the overlay-grid control; keep the default eight columns and six rows, visibility on and grid snapping off. | diff --git a/docs/canvas-pilot/introduction.md b/docs/canvas-pilot/introduction.md index c978a29..68aeeb5 100644 --- a/docs/canvas-pilot/introduction.md +++ b/docs/canvas-pilot/introduction.md @@ -77,7 +77,7 @@ a format for your editor and see which settings it preserves. - **Save your work:** use **Project → Save project…** for a `.pilot.json` file that retains the full editor project. - **Work with another application:** drop a supported geometry file into the window, - use **Import → Geometry file…**, or **Project → Export → Export layers…**. The [starter-file catalog](../templates/canvas-pilot/catalog.md) + use **Import → Geometry file…**, or **Menu → Export → Export layers…**. The [starter-file catalog](../templates/canvas-pilot/catalog.md) has matching Full HD and 4K files in SVG, draw.io, geometry JSON, CSV, DXF/DWG, HTML, PPTX, Figma FIG, FigCraft and Illustrator. Prefer SVG for Illustrator exchange: Illustrator requires a separately installed VectorCraft CLI for both import