mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-12-18 14:06:30 +00:00
element: add property special case for float
This commit is contained in:
parent
d3005335b8
commit
3aded523c2
1 changed files with 8 additions and 1 deletions
|
@ -163,8 +163,15 @@ impl ElementInfo {
|
|||
} else if value.type_().is_a(glib::Type::FLAGS) {
|
||||
let value = value.get::<Vec<&glib::FlagsValue>>().unwrap();
|
||||
let flags = value.iter().copied().fold(0, |acc, val| acc | val.value());
|
||||
|
||||
Ok(flags.to_string())
|
||||
} else if value.type_().is_a(glib::Type::F64) || value.type_().is_a(glib::Type::F32) {
|
||||
let value = value
|
||||
.transform::<String>()
|
||||
.expect("Unable to transform to string")
|
||||
.get::<String>()
|
||||
.unwrap()
|
||||
.replace(',', ".");
|
||||
Ok(value)
|
||||
} else {
|
||||
let value = value
|
||||
.transform::<String>()
|
||||
|
|
Loading…
Reference in a new issue