mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-11-09 03:12:26 +00:00
Fixed wrong updating of the editable ComboBox under OSX
This commit is contained in:
1 parent
b4a61a3acb
commit
2ff9505443
1 file changed
+7
-2
@@ -631,8 +631,13 @@ void Choice::set_value(const boost::any& value, bool change_event)
|
|||||||
break;
|
break;
|
||||||
++idx;
|
++idx;
|
||||||
}
|
}
|
||||||
idx == m_opt.enum_values.size() ?
|
if (idx == m_opt.enum_values.size()) {
|
||||||
dynamic_cast<wxComboBox*>(window)->SetValue(text_value) :
|
// For editable Combobox under OSX is needed to set selection to -1 explicitly,
|
||||||
|
// otherwise selection doesn't be changed
|
||||||
|
dynamic_cast<wxComboBox*>(window)->SetSelection(-1);
|
||||||
|
dynamic_cast<wxComboBox*>(window)->SetValue(text_value);
|
||||||
|
}
|
||||||
|
else
|
||||||
dynamic_cast<wxComboBox*>(window)->SetSelection(idx);
|
dynamic_cast<wxComboBox*>(window)->SetSelection(idx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user