mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
C++: Setting a value to a property having a binding should always clear the binding
... even if the old value holds the same value as the new value This fixes test_cpp_bindings_two_way_priority_default Also add a C++ unit test that tests the Property type specificaly
This commit is contained in:
parent
a2d5ddaeca
commit
2aaefa8e0d
3 changed files with 45 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ struct Property
|
|||
|
||||
void set(const T &value) const
|
||||
{
|
||||
if (this->value != value) {
|
||||
if ((inner._0 & 0b10) == 0b10 || this->value != value) {
|
||||
this->value = value;
|
||||
cbindgen_private::slint_property_set_changed(&inner, &this->value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue