mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 02:16:07 +08:00
parent
9aca685dd4
commit
9d20b01c5b
@ -342,6 +342,11 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent,
|
|||||||
this->Bind(wxEVT_TEXT_ENTER, [this, edit_fn](wxEvent&)
|
this->Bind(wxEVT_TEXT_ENTER, [this, edit_fn](wxEvent&)
|
||||||
{
|
{
|
||||||
m_enter_pressed = true;
|
m_enter_pressed = true;
|
||||||
|
// Workaround! Under Linux we have to use CallAfter() to avoid crash after pressing ENTER key
|
||||||
|
// see #7531, #8055, #8408
|
||||||
|
#ifdef __linux__
|
||||||
|
wxTheApp->CallAfter([this, edit_fn]() {
|
||||||
|
#endif
|
||||||
// If LayersList wasn't updated/recreated, we can call wxEVT_KILL_FOCUS.Skip()
|
// If LayersList wasn't updated/recreated, we can call wxEVT_KILL_FOCUS.Skip()
|
||||||
if (m_type & etLayerHeight) {
|
if (m_type & etLayerHeight) {
|
||||||
if (!edit_fn(get_value(), true, false))
|
if (!edit_fn(get_value(), true, false))
|
||||||
@ -354,6 +359,9 @@ LayerRangeEditor::LayerRangeEditor( ObjectLayers* parent,
|
|||||||
SetValue(m_valid_value);
|
SetValue(m_valid_value);
|
||||||
m_call_kill_focus = true;
|
m_call_kill_focus = true;
|
||||||
}
|
}
|
||||||
|
#ifdef __linux__
|
||||||
|
});
|
||||||
|
#endif
|
||||||
}, this->GetId());
|
}, this->GetId());
|
||||||
|
|
||||||
this->Bind(wxEVT_KILL_FOCUS, [this, edit_fn](wxFocusEvent& e)
|
this->Bind(wxEVT_KILL_FOCUS, [this, edit_fn](wxFocusEvent& e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user