mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
C++ Make sure that the layout is properly updated when the model of a for
or if
changes
The problem is that the backend is using the `meta_property_listener` to know if the layout must be updated, but the C++ code would not register a dependency NOTE about the test: The test doesn't really test that it works because the test backend don't have a meta_property_listener and apply the layout inconditionally in sixtyfps_send_mouse_click
This commit is contained in:
parent
13a2138022
commit
b34a34cea0
2 changed files with 59 additions and 9 deletions
|
@ -552,6 +552,10 @@ public:
|
|||
} else {
|
||||
inner->data.clear();
|
||||
}
|
||||
} else {
|
||||
// just do a get() on the model to register dependencies so that, for example, the
|
||||
// layout property tracker becomes dirty.
|
||||
model.get();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue