From 606026a920064400ed5f0e0676542be69807435e Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Wed, 12 Aug 2026 18:59:12 +0200 Subject: [PATCH] Home: axonometric view, fitted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DesignCanvas::set_view() and fit_view() were both written and then never called from anywhere in the tree. The Design viewport has had no way back to a standard view since it existed: no key, no button, nothing but orbiting by hand until the model happens to drift into frame. That is worse than a missing convenience. A camera left pointing along the bed plane renders a scene that looks exactly like a failed renderer — geometry present, nothing visible — and an hour went into blaming the software GL stack before the real cause turned out to be two uncalled functions. Home rather than a letter: every letter A-Z is already a Shift+letter tool shortcut. Home is also the reset-the-view key most users arrive with. The dispatcher needed no change, it keys on the raw wx keycode. set_view() already does select_view + zoom_to_volumes, so this is fit and orient in one call. Doc row added to the View toggles table in docs/design_tab.md. Co-Authored-By: Claude Opus 5 (1M context) --- docs/design_tab.md | 1 + src/slic3r/GUI/DesignPanel.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/design_tab.md b/docs/design_tab.md index f9ad40cacb..9c65df332b 100644 --- a/docs/design_tab.md +++ b/docs/design_tab.md @@ -137,6 +137,7 @@ selected by the mode, not by whether a sketch session is running. | Key | Action | |---|---| +| `Home` | Axonometric view, fitted to the model | | `P` | Origin planes on/off | | `A` | World axes on/off | | `X` | Section view on/off | diff --git a/src/slic3r/GUI/DesignPanel.cpp b/src/slic3r/GUI/DesignPanel.cpp index a80f3a0836..d430f713cf 100644 --- a/src/slic3r/GUI/DesignPanel.cpp +++ b/src/slic3r/GUI/DesignPanel.cpp @@ -426,6 +426,23 @@ DesignPanel::DesignPanel(wxWindow* parent) }; m_keys_feature['X'] = [this] { toggle_section_view(); }; // toggle the single section on/off + // Home: axonometric view, fitted to the model. + // + // DesignCanvas::set_view() and fit_view() were written and then never called from + // anywhere in the tree, so the Design viewport had NO way back to a standard view — + // no key, no button, nothing but orbiting by hand until the model happened to be in + // frame. A camera left pointing along the bed plane looks exactly like a renderer + // that has failed, which is how this was found. + // + // Home rather than a letter because every letter A-Z is already a Shift+letter tool + // shortcut, and because Home is the reset-the-view key users arrive with. set_view() + // already does select_view + zoom_to_volumes, so this is fit and orient in one. + m_keys_feature[WXK_HOME] = [this] { + if (!m_viewport) return; + m_viewport->set_view("iso"); + set_status(_L("Isometric view, fitted")); + }; + // Shared flyout glyph tint (used by BOTH the feature and sketch toolbars). Re-tint each // design_* glyph to the DropDown's resolved TEXT colour so it reads on the popup in either // theme: text_color is 0x363636, which darkModeColorFor() maps to a light tone in dark mode