on xenial help sign in
Need the if for restorePosition here too
commitc1822214199d5985ca6d9c134024c715d6159a34 authorAlbert Astals <albert.astals@canonical.com> dateMon 21 Jul 2014, 15:03 (12 years ago) parent1dd293d
1 file changed+7−2
qml/Dash/ScopesOverview.qml+7−2
qml/Dash/ScopesOverview.qml+7−2
@@ -470,8 +470,13 @@ Item {
470470 onBackClicked: {
471471 var v = scopesOverviewXYScaler.restoreSize.width / tempScopeItem.width;
472472 scopesOverviewXYScaler.scale = v;
473− scopesOverviewXYScaler.x = scopesOverviewXYScaler.restorePosition.x -(tempScopeItem.width - tempScopeItem.width * v) / 2;
474− scopesOverviewXYScaler.y = scopesOverviewXYScaler.restorePosition.y -(tempScopeItem.height - tempScopeItem.height * v) / 2;
473+ if (scopesOverviewXYScaler.restorePosition) {
474+ scopesOverviewXYScaler.x = scopesOverviewXYScaler.restorePosition.x -(tempScopeItem.width - tempScopeItem.width * v) / 2;
475+ scopesOverviewXYScaler.y = scopesOverviewXYScaler.restorePosition.y -(tempScopeItem.height - tempScopeItem.height * v) / 2;
476+ } else {
477+ scopesOverviewXYScaler.x = 0;
478+ scopesOverviewXYScaler.y = 0;
479+ }
475480 scopesOverviewXYScaler.opacity = 0;
476481 middleItems.overrideOpacity = -1;
477482 }