Commit Graph

17051 Commits

Author SHA1 Message Date
Vovodroid
9282d2de1d Fix arc fitting time progress with firmware retraction. (#12888) 2026-04-07 22:20:33 +08:00
Rodrigo Faselli
d27889eb0f Fix fuzzy skin regresion classic wall generator (#12920)
Co-authored-by: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
2026-04-06 15:29:23 -03:00
Eldenroot
7bec6c2d6b unix: Add model/step to the list of supported mime-types (#13000)
Cherry picked:

64d360523d (diff-cc4863f0a9f2b1f46d3b0e04611772075d67ba61b6bdcfdc3a746b265668f8f4)
2026-04-06 15:51:52 +03:00
Sabriel-Koh
b79d3e1701 Fix: generic filaments not showing on list (#13037) 2026-04-06 14:27:49 +08:00
Rodrigo Faselli
7d21cf78c7 💥Fix crash when return from assembly mode linux (#13091)
* Fix return from assembly linux

* Tie deferred callback to canvas lifetime and add shutdown guards

Use m_canvas->CallAfter instead of wxGetApp().CallAfter to ensure the callback is only executed if the canvas is still alive.
Add early returns if wxGetApp().is_closing() is true before accessing plater or the 3D canvas, reducing the risk of use-after-free during application shutdown.
Addresses feedback regarding potential UI teardown race conditions.

* copilot suggestion

* Use local reference to wxGetApp() in Return button callback

Replace multiple calls to wxGetApp() with a single local reference
to improve readability and avoid redundant function calls.
2026-04-06 14:06:48 +08:00
Kevin Lynagh
5ba71e1198 Allow printing even if nozzle info isn't reported by firmware. (#12814)
* Don't assume 0.4mm nozzle; format as "unknown" if not defined.

* Skip nozzle diameter and hardness checks if nozzle info unknown.

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-04-06 12:40:36 +08:00
Derrick
5308fb5961 Add fallback for Qidi series ID matching (#13065)
# Description

The Qidi Max 4 and Q2 don't report what they are via /server/info like
the other Qidi printers apparently do. This means that filament matching
is a fool's erand because you'll never actually match anything. this
adds a fallback where we just use the configured machine type. I'm not
sure why we wouldn't just do that all the time, but I wanted to change
as little as possible.

Here's the entirety of the `/server/info` output from a Qidi Max 4:
```
{
  "result": {
    "klippy_connected": true,
    "klippy_state": "ready",
    "components": [
      "secrets",
      "template",
      "klippy_connection",
      "jsonrpc",
      "internal_transport",
      "application",
      "websockets",
      "database",
      "dbus_manager",
      "file_manager",
      "authorization",
      "klippy_apis",
      "shell_command",
      "machine",
      "data_store",
      "proc_stats",
      "job_state",
      "job_queue",
      "history",
      "http_client",
      "announcements",
      "webcam",
      "extensions",
      "octoprint_compat",
      "timelapse",
      "frp_manager",
      "mqtt"
    ],
    "failed_components": [],
    "registered_directories": [
      "config",
      "logs",
      "gcodes",
      "timelapse",
      "timelapse_frames",
      "config_examples",
      "docs"
    ],
    "warnings": [],
    "websocket_count": 3,
    "moonraker_version": "?",
    "missing_klippy_requirements": [],
    "api_version": [
      1,
      4,
      0
    ],
    "api_version_string": "1.4.0"
  }
}
```

There's no machine name or hostname. This is also what the response
looks like from a Q2, including the exact same API version numbers, so
we cannot match on that either.
2026-04-06 11:44:03 +08:00
Rodrigo Faselli
05e397f98d Fix save custom machine profiles with different extruder count (#13035)
* fix save profiles

* clean 1

* copilot suggestions
2026-04-06 10:01:58 +08:00
Rodrigo Faselli
cfc2e9b62a Fix "Access Violation" (#12704) (#12856)
Co-authored-by: Kiss Lorand <50251547+kisslorand@users.noreply.github.com>
2026-04-05 15:10:09 -03:00
Rodrigo Faselli
aa51d1965f Don't steal focus from text inputs on mouse (#12834)
In GLCanvas3D::on_mouse, avoid calling SetFocus when the currently focused window is a text input control (wxTextCtrl, wxComboBox or wxSpinCtrl). This prevents deselection bugs when the mouse leaves the window while a text control is focused. Also commented out explicit wx text-control includes near the top of the file.

Only TextCtrl needed

cleaning

Removed unused wxWidgets header includes.

Update GLCanvas3D.cpp

Co-authored-by: yw4z <yw4z@outlook.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-04-05 13:53:41 +03:00
Kiss Lorand
362ddec743 Fix overhang reverse threshold being ignored (#13061) 2026-04-04 16:56:42 -03:00
TheLegendTubaGuy
6682f9a94c Merge branch 'main' into fix_max_4_sync 2026-04-04 03:02:48 -05:00
Eldenroot
d7dbe6a0ed UX: Convert 'Change type' to submenu with checkmarks (#12205)
* UX: Convert 'Change type' to submenu with checkmarks

* Update GUI_ObjectList.cpp

* Update GUI_ObjectList.hpp

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-04-04 04:31:26 +03:00
TheLegendTubaGuy
e0e714d22a Add fallback for Max 4 series ID matching
The Qidi Max 4 doesn't report that it's a Qidi Max 4 via /server/info
like the other Qidi printers apparently do.  This means that filament
matching is a fool's erand because you'll never actually match anything.
this adds a fallback where we just use the configured machine type.  I'm
not sure why we wouldn't just do that all the time, but I wanted to
change as little as possible.
2026-04-01 03:07:24 -05:00
SoftFever
c948d87102 Fix flush_multiplier type mismatch: use ConfigOptionFloats instead of ConfigOptionFloat (#13062) 2026-04-01 14:43:12 +08:00
Eyal Levin
44faf142f9 Fix: generic locale fallback on all platforms when language is unavai… (#12948)
Fix: generic locale fallback on all platforms when language is unavailable

  Move the locale fallback chain out of the #ifdef __linux__ block so it
  applies on macOS and Windows too. Add a base-language fallback step that
  strips the region code (e.g. en_IL -> en) before trying the full
  fallback chain (current locale, system, best, en_US, en_UK).

  Previously, if wxLocale::IsAvailable() failed on non-Linux, the app
  would show an error and exit. Now it gracefully falls back to a working
  locale.

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-03-30 19:26:00 +08:00
Noisyfox
239253ecb1 Fix title bar resize grabber on Windows (#13020)
Make sure the title control passes all mouse events to its parent
2026-03-30 19:18:56 +08:00
SoftFever
a475e35730 Fix non-ASCII path corruption on Windows using from_path() helper (#13036) 2026-03-30 14:51:45 +08:00
SoftFever
b9952b39ad Fix slice/print panel background to use theme-transformed color 2026-03-30 12:29:14 +08:00
SoftFever
094dfc14bd Fix missing commas in vendor string arrays causing silent concatenation 2026-03-30 12:29:14 +08:00
SoftFever
d62aa42e61 Fix macOS WebView script-handler cleanup after wxWidgets 3.3 upgrade
Commit ed88cbe removed `new WebViewWebKit` on macOS because wx 3.3
dropped the no-arg wxWebViewWebKit constructor, falling through to
wxWebView::New(). That bypassed the WebViewWebKit destructor that calls
RemoveScriptMessageHandler("wx"), reintroducing the WebKit teardown bug
the subclass was added to fix.

Restore the macOS-specific subclass path by adding a constructor that
forwards to the wx 3.3 wxWebViewConfiguration-based ctor.
2026-03-30 11:53:48 +08:00
Mitchell Mashburn
c036ce059a Add re:3D printer profiles (#12935)
# Description

* Add re:3D printer profiles.

# Screenshots/Recordings/Graphs

<img width="404" height="275" alt="image" src="https://github.com/user-attachments/assets/b7a747a8-4d1a-440f-a214-4a98619e6723" />


## Tests

* Tested build on Linux Ubuntu.
* Ran profile validation script:

<img width="439" height="74" alt="image" src="https://github.com/user-attachments/assets/ad10e0a0-de9b-45c6-a40e-6cacb6e7b779" />
2026-03-30 10:36:28 +08:00
SoftFever
7d7f26ed69 fix a bug that switching from dark mode to light mode didn't work on Windows 2026-03-29 23:51:17 +08:00
SoftFever
eefdabcd98 Fix maximized window not filling desktop after wxWidgets 3.3.2 upgrade
wxWidgets 3.3.2 changed MSWGetStyle to add WS_CAPTION when
wxMINIMIZE_BOX/wxMAXIMIZE_BOX/wxCLOSE_BOX is set. This caused
DefWindowProc to subtract the caption height in WM_NCCALCSIZE for
maximized windows, shrinking the client area and creating a gap
above the taskbar.

Fix by handling WM_NCCALCSIZE for the maximized case explicitly
(strip only border overshoot, not caption) and removing the now
unnecessary wxEVT_MAXIMIZE workaround.
2026-03-29 01:08:06 +08:00
SoftFever
c06a0223a7 Fix 3D canvas blank area during window resize after wxWidgets 3.3.2 upgrade 2026-03-28 15:46:34 +08:00
SoftFever
779a36bf8b fix a regresion that the "search in preset" popup dialog will dismiss itself when move the cursor out of the dialog.
The regression is casued by 382cf57166 ("Fix hotkeys blocked in Prepare view when notification is shown")
2026-03-28 13:04:20 +08:00
SoftFever
bf397a0632 fix an issue that white boarder is visible for context/file menu on Windows when dark mode is enabled 2026-03-28 00:54:59 +08:00
SoftFever
c8a53a219a fix split button separator color in light mode on macOS 2026-03-27 17:23:44 +08:00
SoftFever
88eb2ab8df reapply wxALIGN_CENTER_VERTICAL 2026-03-27 14:53:56 +08:00
SoftFever
c443129f34 fix build errors on latest xcode 2026-03-27 14:32:40 +08:00
SoftFever
b6184a540e reduce the sidebar's width a bit 2026-03-27 00:27:39 +08:00
SoftFever
fe55b260b4 suppress: gtk_style_context_add_provider: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed 2026-03-26 16:22:07 +08:00
SoftFever
6148ba16b3 Fix GTK negative content width warnings for bitmap toggle buttons
On Linux/GTK, CheckBox, RadioBox, and SwitchButton set their size to
exactly the bitmap size (18x18 or 16x16), but GTK's internal CSS padding
requires additional space, resulting in negative content width warnings.
Use GetBestSize() on GTK to account for theme padding.
2026-03-26 16:05:58 +08:00
SoftFever
e70fe6c1df fix Windows build errors 2026-03-26 14:10:10 +08:00
SoftFever
fd47370c5c fix Windows build errors - wip 2026-03-26 10:17:19 +08:00
SoftFever
80c958d98b Remove macOS text position fudge factors (no longer needed with wx 3.3) 2026-03-25 15:58:39 +08:00
SoftFever
ed88cbe3f5 Use wxWebView::New() factory on macOS (direct ctor removed in wx 3.3) 2026-03-25 12:44:02 +08:00
SoftFever
11a80a1e1c Disambiguate state_handler.attach() call in Button.cpp 2026-03-25 11:35:25 +08:00
SoftFever
2b3328c2b2 Fix char + wstring concat in Search.cpp tooltip builder 2026-03-25 11:34:45 +08:00
SoftFever
1765d296a8 Fix wxArrayString ctor, wstring concat, and wxList::Node for wx 3.3
- Plater: use Add() instead of wxArrayString(size_t, wxString) ctor
- Search: change sep from std::wstring to wxString for concatenation
- SendMultiMachinePage: replace wxList::Node* with compatibility_iterator
  (Node type removed in wx 3.3 with wxUSE_STD_CONTAINERS=ON)
2026-03-25 11:33:50 +08:00
SoftFever
7cbd9bfb3c Fix ambiguous overload, wxScopedCharBuffer comparison, and wxArrayString ctor
- PhysicalPrinterDialog: disambiguate set_values() call with explicit
  std::vector<std::string> (wxArrayString now also matches initializer list)
- Preferences: use ToStdString() instead of mb_str() for std::string comparison
- Plater: use wxString::FromUTF8() for wxArrayString constructor argument
2026-03-25 11:31:44 +08:00
SoftFever
0af0327d60 Fix narrow/wide string concat in SyncAmsInfoDialog.cpp
Same pattern as earlier fixes: const char[] + std::wstring fails in
wx 3.3 where wxUSE_STD_CONTAINERS=ON. Wrap with wxString().
2026-03-25 11:30:21 +08:00
SoftFever
7ea69199fd Fix wxDynamicCast on wxComboPopup for wxWidgets 3.3
wxComboPopup no longer inherits from wxObject in wx 3.3, so
wxDynamicCast (which casts through wxObject) fails. Use dynamic_cast
directly instead.
2026-03-25 11:29:40 +08:00
SoftFever
d9c229ca35 Fix narrow/wide string concatenation errors for wxWidgets 3.3
In wx 3.3 with wxUSE_STD_CONTAINERS=ON, wxString is backed by
std::wstring, so direct concatenation of const char[] with
std::wstring or wxUniCharRef fails. Fix by splitting compound
concatenations into separate += operations on wxString, or by
wrapping the left operand in wxString() to use its operator+.

Files fixed:
- AuxiliaryDataViewModel.cpp: split "\\" + wxString/wstring chains
- AboutDialog.cpp: split std::string("\n") + wxUniCharRef
- Auxiliary.cpp: wrap dir.wstring() in wxString(), split "/" + wstring
2026-03-25 11:28:00 +08:00
SoftFever
5f365b5c6b Fix BitmapComboBox for wxWidgets 3.3 (wxBitmap -> wxBitmapBundle)
In wxWidgets 3.3, wxBitmapComboBoxBase::OnAddBitmap changed its
parameter from const wxBitmap& to const wxBitmapBundle&, and m_bitmaps
was replaced by m_bitmapbundles. Update OnAddBitmap signature and
OnDrawItem to use wxBitmapBundle, extracting wxBitmap via
GetBitmap(GetDefaultSize()) where needed.
2026-03-25 11:26:32 +08:00
SoftFever
85390a9da0 Guard wxToolTip::GetToolTipCtrl() for wx 3.3 and add explicit wx/utils.h includes
- Wrap GetToolTipCtrl() call in GUI_App.cpp with #if wxVERSION_NUMBER < 3300
  guard, as this API may not be accessible in wxWidgets 3.3. The dark tooltip
  theming is cosmetic and non-critical.

- Add explicit #include <wx/utils.h> to 7 source files that use functions from
  that header (wxGetMousePosition, wxLaunchDefaultBrowser, wxGetDisplaySize,
  wxBell) but relied on transitive includes. This preempts breakage from
  wxWidgets 3.3 reducing transitive includes.

Files with wx/utils.h added: BBLTopbar.cpp, CreatePresetsDialog.cpp,
CameraPopup.cpp, GLCanvas3D.cpp, GCodeViewer.cpp, GUI_ObjectList.cpp,
FilamentMapPanel.cpp.

Skipped BindDialog.cpp and FilamentPickerDialog.cpp as they already include
wx/wx.h which provides wx/utils.h transitively.

Part of wxWidgets 3.1.5 -> 3.3.2 upgrade.
2026-03-24 21:02:37 +08:00
SoftFever
ba867cc534 Add Show() before Raise() calls for wxWidgets 3.3 compatibility
In wxWidgets 3.3, wxWindow::Raise() no longer implies Show(). Add
explicit Show() before Raise() in two event handlers that activate the
main frame from another instance (load model, start download), and swap
the Show/Raise order in bring_instance_forward() so Show() precedes
Raise().
2026-03-24 20:57:58 +08:00
SoftFever
026b105dcb Remove wxTRANSPARENT_WINDOW flag for wxWidgets 3.3 compatibility
wxTRANSPARENT_WINDOW is removed in wxWidgets 3.3. Remove all 3
occurrences in MainFrame.cpp:

- ResizeEdgePanel constructor: already uses wxBG_STYLE_TRANSPARENT
  via SetBackgroundStyle(), so the flag was redundant
- slice_panel and print_panel: drop the style parameter entirely
  (defaults to 0)
2026-03-24 20:56:04 +08:00
SoftFever
1065d85dbc Fix wxEXPAND | wxALIGN_* sizer flag conflicts for wxWidgets 3.2+
wxWidgets 3.2+ asserts on invalid sizer flag combinations where
wxEXPAND (which fills the entire space in the secondary direction)
is combined with wxALIGN_* flags (which are meaningless when expanding).
Remove the conflicting wxALIGN_* flags from all 112 occurrences across
21 files, keeping wxEXPAND and any non-conflicting flags intact.
2026-03-24 20:50:44 +08:00
SoftFever
024d5dc64d Remove wxCHECK_VERSION(3,1,x) guards and legacy wxinit.h macros
Since we now target wxWidgets 3.3, all wxCHECK_VERSION(3,1,N) checks
are always true. Remove the guards keeping only the true branches:

- I18N.hpp: Remove version guard around _wxGetTranslation_ctx macro
- ExtraRenderers.hpp, GUI_App.hpp: Simplify SUPPORTS_MARKUP to check
  only wxUSE_MARKUP (version check always true)
- ConfigWizard.cpp: Remove manual wxArrayInt comparison fallback
- SendSystemInfoDialog.cpp: Simplify display scaling guard to _WIN32 only
- GUI_Utils.cpp: Remove IsDark() fallback using luma approximation
- wxinit.h: Remove legacy wxEVT_BUTTON and wxEVT_HTML_LINK_CLICKED
  compat macros (these event names exist natively in wx 3.3)
2026-03-24 20:44:32 +08:00