mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06: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:
parent
01b16814ad
commit
4dd7d79d76
3 changed files with 7 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue