Skip to content

Commit 66fbcf5

Browse files
authored
Merge pull request #393 from alicevision/fix_AE_filter
AttributeEditor: remove SortFilterDelegateModel
2 parents b42f637 + 45faa86 commit 66fbcf5

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

meshroom/ui/qml/GraphEditor/AttributeEditor.qml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,23 @@ ListView {
1919

2020
implicitHeight: contentHeight
2121

22-
clip: true
2322
spacing: 2
23+
clip: true
2424
ScrollBar.vertical: ScrollBar { id: scrollBar }
2525

26-
model: SortFilterDelegateModel {
26+
model: attributes
2727

28-
model: attributes
29-
filterRole: GraphEditorSettings.showAdvancedAttributes ? "" : "advanced"
30-
filterValue: false
31-
32-
function modelData(item, roleName) {
33-
return item.model.object.desc[roleName]
34-
}
28+
delegate: Loader {
29+
active: !object.desc.advanced || GraphEditorSettings.showAdvancedAttributes
30+
visible: active
31+
height: item ? item.implicitHeight : -spacing // compensate for spacing if item is hidden
3532

36-
Component {
37-
id: delegateComponent
38-
AttributeItemDelegate {
39-
width: ListView.view.width - scrollBar.width
40-
readOnly: root.readOnly
41-
labelWidth: root.labelWidth
42-
attribute: object
43-
onDoubleClicked: root.attributeDoubleClicked(mouse, attr)
44-
}
33+
sourceComponent: AttributeItemDelegate {
34+
width: root.width - scrollBar.width
35+
readOnly: root.readOnly
36+
labelWidth: root.labelWidth
37+
attribute: object
38+
onDoubleClicked: root.attributeDoubleClicked(mouse, attr)
4539
}
4640
}
4741

0 commit comments

Comments
 (0)