From 295c0303090487f1be39c05df7969318ed6e7913 Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Sun, 26 Jul 2026 12:27:02 +0200 Subject: [PATCH] DesignPanel.hpp: declare the three wx types it uses but never named MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header forward-declares a long list of wx types and omitted wxBoxSizer, wxTextCtrl and wxListCtrl. All three are used as pointer members only (m_expr_text, m_var_list, m_parts_hdr, m_hdr_tree_row), so a forward declaration is all they need — but there was none. Every ordinary build compiled anyway because the wx/panel.h + wx/scrolwin.h chain happens to pull the real headers in transitively. The Snapmaker fork Flatpak build (aarch64) has a wx that does not, and it failed outright: DesignPanel.hpp:511: error: 'wxTextCtrl' does not name a type; did you mean 'wxTreeCtrl'? DesignPanel.hpp:521: error: 'wxListCtrl' does not name a type; did you mean 'wxFileCtrl'? DesignPanel.hpp:663: error: 'wxBoxSizer' does not name a type; did you mean 'wxSizer'? plus a cascade of "m_var_list / m_expr_text / m_parts_hdr was not declared in this scope". Not an environment quirk: the header was simply not self-contained, which is exactly what breaks a reviewer building in an unfamiliar configuration. The mainline fork Flatpaks passed on both arches, so only that one manifest exposed it. Audited the rest of the header afterwards: every other wx pointer type is either forward-declared or genuinely included — only wxScrolledWindow and wxWindow are undeclared, and both come from the real wx/scrolwin.h include. snaporca-4dn Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM --- src/slic3r/GUI/DesignPanel.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/slic3r/GUI/DesignPanel.hpp b/src/slic3r/GUI/DesignPanel.hpp index 1e78fd1403..d4d0cbd95f 100644 --- a/src/slic3r/GUI/DesignPanel.hpp +++ b/src/slic3r/GUI/DesignPanel.hpp @@ -25,6 +25,15 @@ class wxStaticLine; class Button; // Orca-styled button (Widgets/Button.hpp) class CheckBox; // Orca teal checkbox (Widgets/CheckBox.hpp) class wxSizer; +// wxBoxSizer, wxTextCtrl and wxListCtrl are used here as pointers only, so a forward +// declaration is enough — but they must be declared. Every ordinary build happened to pull +// them in transitively through the wx/panel.h + wx/scrolwin.h chain. The Snapmaker fork's +// Flatpak build does not, and it failed to compile this header with "'wxTextCtrl' does not +// name a type; did you mean 'wxTreeCtrl'?". Declaring them keeps the header self-contained +// instead of relying on whatever a particular wx configuration happens to include. +class wxBoxSizer; +class wxTextCtrl; +class wxListCtrl; class wxButton; class wxPanel; class ScalableButton;