on xenial help sign in
Use the categoryId, not the item.objectName, they have the same contents but objectName feels a bit wrong to use
commit9edbf3bb6fbea22880a5a703d1896cdb22a50f91 authorAlbert Astals <albert.astals@canonical.com> dateThu 26 Sep 2013, 12:50 (13 years ago) parent7950229
1 file changed+3−3
Dash/GenericScopeView.qml+3−3
Dash/GenericScopeView.qml+3−3
@@ -66,7 +66,7 @@ ScopeView {
6666
6767 readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
6868 readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filter : true
69− readonly property string category: rendererLoader.item ? rendererLoader.item.objectName : ""
69+ readonly property string category: categoryId
7070
7171 Loader {
7272 id: rendererLoader
@@ -88,7 +88,7 @@ ScopeView {
8888 }
8989 item.objectName = Qt.binding(function() { return categoryId })
9090 if (item.expandable) {
91− var shouldFilter = item.objectName != categoryView.expandedCategoryId;
91+ var shouldFilter = categoryId != categoryView.expandedCategoryId;
9292 if (shouldFilter != item.filter) {
9393 item.filter = shouldFilter;
9494 }
@@ -127,7 +127,7 @@ ScopeView {
127127 onExpandedCategoryIdChanged: {
128128 var item = rendererLoader.item;
129129 if (item.expandable) {
130− var shouldFilter = item.objectName != categoryView.expandedCategoryId;
130+ var shouldFilter = categoryId != categoryView.expandedCategoryId;
131131 if (shouldFilter != item.filter) {
132132 // If the filter animation will be seen start it, otherwise, just flip the switch
133133 var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;