mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
wxExtensions.cpp: BitmapChoiceRenderer now updates config immediately after its combobox closes
This was needed because for some reason, the combobox would not lose focus when mouse left the ObjectList on Linux (KILL_FOCUS forces the update). The update could be bypassed on Win too by changing extruder and hitting shortcut to reslice.
This commit is contained in:
parent
7b45014721
commit
0dfbfa62df
1 changed files with 6 additions and 1 deletions
|
@ -2179,7 +2179,12 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
||||||
c_editor->SetSelection(atoi(data.GetText().c_str()));
|
c_editor->SetSelection(atoi(data.GetText().c_str()));
|
||||||
|
|
||||||
// to avoid event propagation to other sidebar items
|
// to avoid event propagation to other sidebar items
|
||||||
c_editor->Bind(wxEVT_COMBOBOX, [](wxCommandEvent& evt) { evt.StopPropagation(); });
|
c_editor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) {
|
||||||
|
evt.StopPropagation();
|
||||||
|
// FinishEditing grabs new selection and triggers config update. We better call
|
||||||
|
// it explicitly, automatic update on KILL_FOCUS didn't work on Linux.
|
||||||
|
this->FinishEditing();
|
||||||
|
});
|
||||||
|
|
||||||
return c_editor;
|
return c_editor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue