on xenial help sign in
Don't let us change between scopes if the current one is moving up/down
2504082Albert Astals
Dash/DashContent.qml+5−5
@@ -83,7 +83,7 @@ Item {
83 id: dashContentList
83 id: dashContentList
84 objectName: "dashContentList"
84 objectName: "dashContentList"
85
85
86− interactive: dashContent.scopes.loaded
86+ interactive: dashContent.scopes.loaded && !currentItem.previewShown && !currentItem.moving
87
87
88 anchors.fill: parent
88 anchors.fill: parent
89 model: dashContent.model
89 model: dashContent.model
@@ -116,6 +116,9 @@ Item {
116 source: scopeMapper.map(scope.id)
116 source: scopeMapper.map(scope.id)
117 objectName: scope.id + " loader"
117 objectName: scope.id + " loader"
118
118
119+ readonly property bool previewShown: item.previewShown
120+ readonly property bool moving: item.moving
121+
119 // these are needed for autopilot tests
122 // these are needed for autopilot tests
120 readonly property string scopeId: scope.id
123 readonly property string scopeId: scope.id
121 readonly property bool isCurrent: ListView.isCurrentItem
124 readonly property bool isCurrent: ListView.isCurrentItem
@@ -135,10 +138,7 @@ Item {
135 onEndReached: contentEndReached()
138 onEndReached: contentEndReached()
136 onPreviewShownChanged: {
139 onPreviewShownChanged: {
137 if (item.previewShown) {
140 if (item.previewShown) {
138− previewShown()
141+ dashContent.previewShown()
139− dashContentList.interactive = false
140− } else {
141− dashContentList.interactive = true
142 }
142 }
143 }
143 }
144 }
144 }
Dash/GenericScopeView.qml+2
@@ -24,6 +24,8 @@ ScopeView {
24 readonly property alias previewShown: previewLoader.onScreen
24 readonly property alias previewShown: previewLoader.onScreen
25 property bool enableHeightBehaviorOnNextCreation: false
25 property bool enableHeightBehaviorOnNextCreation: false
26
26
27+ moving: categoryView.moving
28+
27 onIsCurrentChanged: {
29 onIsCurrentChanged: {
28 pageHeader.resetSearch();
30 pageHeader.resetSearch();
29 previewLoader.open = false;
31 previewLoader.open = false;
Dash/ScopeView.qml+1
@@ -23,6 +23,7 @@ FocusScope {
23 property SortFilterProxyModel categories: categoryFilter
23 property SortFilterProxyModel categories: categoryFilter
24 property bool isCurrent
24 property bool isCurrent
25 property ListModel searchHistory
25 property ListModel searchHistory
26+ property bool moving: false
26
27
27 signal endReached
28 signal endReached
28 signal movementStarted
29 signal movementStarted