on xenial help sign in
when zooming to "All" from temp scope make sure the "All" card we zoom to is on view
1dd293dAlbert Astals
qml/Dash/Dash.qml+1
@@ -147,6 +147,7 @@ Showable {
147 scopeThatOpenedScope = currentScope;
147 scopeThatOpenedScope = currentScope;
148 scopeItem.scope = scope;
148 scopeItem.scope = scope;
149 scopesOverview.currentTab = 1;
149 scopesOverview.currentTab = 1;
150+ scopesOverview.ensureAllScopeVisible(scope.id);
150 x = -width;
151 x = -width;
151 }
152 }
152 onScopeLoaded: {
153 onScopeLoaded: {
qml/Dash/ScopesOverview.qml+10
@@ -115,6 +115,16 @@ Item {
115 }
115 }
116 }
116 }
117
117
118+ function ensureAllScopeVisible(scopeId) {
119+ if (middleItems.count > 1) {
120+ var loaderItem = middleItems.itemAt(1).item;
121+ if (loaderItem) {
122+ var pos = loaderItem.scopeCardPosition(scopeId);
123+ loaderItem.contentY = Math.min(pos.y, loaderItem.contentHeight - loaderItem.height);
124+ }
125+ }
126+ }
127+
118 onProgressChanged: {
128 onProgressChanged: {
119 if (progress == 0) {
129 if (progress == 0) {
120 pageHeader.resetSearch();
130 pageHeader.resetSearch();
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -156,7 +156,7 @@ void Scope::activate(QVariant const& result)
156 qDebug() << "Called activate on scope" << m_id << "with result" << result;
156 qDebug() << "Called activate on scope" << m_id << "with result" << result;
157 if (result.toString() == "Result.2.2") {
157 if (result.toString() == "Result.2.2") {
158 Scopes *scopes = dynamic_cast<Scopes*>(parent());
158 Scopes *scopes = dynamic_cast<Scopes*>(parent());
159− m_openScope = scopes->getScopeFromAll("MockScope2");
159+ m_openScope = scopes->getScopeFromAll("MockScope9");
160 Q_EMIT openScope(m_openScope);
160 Q_EMIT openScope(m_openScope);
161 }
161 }
162}
162}