diff options
author | Remco Burema <41987080+rburema@users.noreply.github.com> | 2022-07-01 15:44:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-01 15:44:23 +0300 |
commit | 7ae1b2a07489c8e7d23937d68f2114a0a24564ab (patch) | |
tree | 07f589c7595834d3242eee72eec433655959bd55 /resources | |
parent | e843849f0e86f636d3e9404ce2b8d975c2ccc137 (diff) | |
parent | a8a2fd8007801d1eba09318b908246a21bb3a28d (diff) |
Merge pull request #12635 from Ultimaker/CURA-9270_discard_or_keep_changes_not_updating
Add the "clear" hack to the tableModel for discardOrkeepchanges
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 0579cb3c30..0b39d84177 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -24,6 +24,16 @@ UM.Dialog property var changesModel: Cura.UserChangesModel { id: userChangesModel } + // Hack to make sure that when the data of our model changes the tablemodel is also updated + // If we directly set the rows (So without the clear being called) it doesn't seem to + // get updated correctly. + property var modelRows: userChangesModel.items + onModelRowsChanged: + { + tableModel.clear() + tableModel.rows = modelRows + } + onVisibilityChanged: { if(visible) @@ -78,8 +88,9 @@ UM.Dialog ] model: UM.TableModel { + id: tableModel headers: ["label", "original_value", "user_value"] - rows: userChangesModel.items + rows: modelRows } sectionRole: "category" } |