1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-11 08:04:25 +00:00

Workaround wxWidgets not allowing SetValue() inside a EVT_COMBOBOX handler on Windows. #1865

This commit is contained in:
Alessandro Ranellucci
2014-04-19 18:42:52 +02:00
parent 8018eac0f0
commit 5d10ef514f
+5 -2
View File
@@ -205,8 +205,11 @@ sub _build_field {
$field->SetValue($_[0]);
};
EVT_COMBOBOX($self->parent, $field, sub {
$field->SetValue($opt->{values}[ $field->GetSelection ]); # set the text field to the selected value
$self->_on_change($opt_key, $on_change);
# Without CallAfter, the field text is not populated on Windows.
Slic3r::GUI->CallAfter(sub {
$field->SetValue($opt->{values}[ $field->GetSelection ]); # set the text field to the selected value
$self->_on_change($opt_key, $on_change);
});
});
EVT_TEXT($self->parent, $field, $on_change);
EVT_KILL_FOCUS($field, $on_kill_focus);