properties: fix the propery value with combo

The property is now the numerical value of the
enum or flags in an element's property
This commit is contained in:
Stéphane Cerveau 2022-02-08 14:34:23 +01:00
parent 935e6c7fb5
commit 1eb49731e1

View file

@ -154,7 +154,9 @@ pub fn property_to_widget<F: Fn(String, String) + 'static>(
combo.connect_changed(move |c| {
if let Some(text) = c.active_text() {
f(c.widget_name().to_string(), text.to_string())
let value = text.to_string();
let value = value.split_once(':');
f(c.widget_name().to_string(), value.unwrap().0.to_string());
}
});
Some(combo.upcast::<gtk::Widget>())