mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-16 17:02:56 +00:00
Fix crash on Linux when switching between tabs in printer config (#6437)
* Fix crash due to the wrong window get returned in `PointCtrl` (SoftFever/OrcaSlicer#6261). `getWindow()` must return the control itself, not its child control; otherwise the child control will be destroyed twice when the tab container is destroyed. * Fix another crash on Linux caused by unused undo button
This commit is contained in:
@@ -506,6 +506,7 @@ public:
|
||||
TextInput* x_input{nullptr};
|
||||
TextInput* y_input{nullptr};
|
||||
|
||||
wxWindow* window{nullptr};
|
||||
void BUILD() override;
|
||||
bool value_was_changed(wxTextCtrl* win);
|
||||
// Propagate value from field to the OptionGroupe and Config after kill_focus/ENTER
|
||||
@@ -524,7 +525,7 @@ public:
|
||||
x_textctrl->Disable();
|
||||
y_textctrl->Disable(); }
|
||||
wxSizer* getSizer() override { return sizer; }
|
||||
wxWindow* getWindow() override { return dynamic_cast<wxWindow*>(x_textctrl); }
|
||||
wxWindow* getWindow() override { return window; }
|
||||
};
|
||||
|
||||
class StaticText : public Field {
|
||||
|
||||
Reference in New Issue
Block a user