Commit ca8949f8 authored by Clément Fauconnier's avatar Clément Fauconnier

fixed handscroll on extended screen

parent 1f9a4858
...@@ -233,12 +233,15 @@ void UBApplicationController::adjustDisplayView() ...@@ -233,12 +233,15 @@ void UBApplicationController::adjustDisplayView()
tr.scale(scaleFactor, scaleFactor); tr.scale(scaleFactor, scaleFactor);
QRect rect = mControlView->rect();
QPoint center(rect.x() + rect.width() / 2, rect.y() + rect.height() / 2);
QTransform recentTransform = mDisplayView->transform(); QTransform recentTransform = mDisplayView->transform();
if (recentTransform != tr) if (recentTransform != tr)
mDisplayView->setTransform(tr); mDisplayView->setTransform(tr);
mDisplayView->centerOn(UBApplication::boardController->activeScene()->lastCenter()); mDisplayView->centerOn(mControlView->mapToScene(center));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment