From f760f4e4620aee3e0f38d8e1bf8c223932284946 Mon Sep 17 00:00:00 2001 From: packerlschupfer <83344883+packerlschupfer@users.noreply.github.com> Date: Sat, 16 May 2026 15:29:01 +0200 Subject: [PATCH] Fix Flow Ratio dialog shrinking after main window minimize (#13545) FlowRateCalibrationDialog was missing the SetSizeHints call that every other calibration dialog in calib_dlg.cpp uses (Cornering, Pa, Pa Pattern, Max Volumetric Speed, Temperature, Retraction, VFA, Input Shaping). Without it, the dialog has no enforced minimum size: on wxGTK, iconizing the main window while the dialog is open triggers a layout/refresh that re-runs Fit() with transient zero-sized children, collapsing the dialog to ~222x249 px with the OK button clipped and unreachable. The window manager then honors the (incorrect) small geometry hint, so the user cannot resize it back manually. Two changes: * Add v_sizer->SetSizeHints(this) after Fit() in the constructor, matching the pattern used by all other dialogs in this file. This locks in the correct minimum the first time Fit() runs, before any iconize event. * Remove the redundant Fit() from on_dpi_changed. With SetSizeHints in place the WM enforces the minimum, but the unconditional Fit() on every DPI/refresh signal was the trigger for the shrink path; Refresh() alone is sufficient here. Co-authored-by: Packerlschupfer --- src/slic3r/GUI/calib_dlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/calib_dlg.cpp b/src/slic3r/GUI/calib_dlg.cpp index ba78d09e2a..5a06b24427 100644 --- a/src/slic3r/GUI/calib_dlg.cpp +++ b/src/slic3r/GUI/calib_dlg.cpp @@ -1518,6 +1518,7 @@ FlowRateCalibrationDialog::FlowRateCalibrationDialog(wxWindow* parent, wxWindowI Layout(); Fit(); + v_sizer->SetSizeHints(this); } FlowRateCalibrationDialog::~FlowRateCalibrationDialog() { @@ -1540,7 +1541,6 @@ void FlowRateCalibrationDialog::on_start(wxCommandEvent& event) { void FlowRateCalibrationDialog::on_dpi_changed(const wxRect& suggested_rect) { this->Refresh(); - Fit(); } }} // namespace Slic3r::GUI