fix activate
slide_model.rs activate function now properly tells of the data that was changed so that ListViews that use it as a model will reset their data properly on changes. The important parts were to ensure we are using the right indexes for top_left and bottom_right. Then also ensure the roles are correct, but I think I had that already, just went with the implementation that CXX-Qt used in their examples.
This commit is contained in:
parent
bd2002ada2
commit
0f0f16e069
2 changed files with 166 additions and 9 deletions
|
@ -74,11 +74,9 @@ Item {
|
|||
target: SlideMod
|
||||
function onDataChanged() {
|
||||
if (active) {
|
||||
previewHighlight.color = Kirigami.Theme.highlightColor;
|
||||
previewSlidesList.currentIndex = index;
|
||||
previewSlidesList.positionViewAtIndex(index, ListView.Center);
|
||||
} else
|
||||
previewHighlight.color = Kirigami.Theme.backgroundColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue