Commit 43004272 authored by SnowLeo's avatar SnowLeo

Translate control view instead of scrolling separately

parent f1ad3f3b
...@@ -646,9 +646,10 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint) ...@@ -646,9 +646,10 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint)
void UBBoardController::handScroll(qreal dx, qreal dy) void UBBoardController::handScroll(qreal dx, qreal dy)
{ {
mControlView->horizontalScrollBar()->setValue(mControlView->horizontalScrollBar()->value() - dx); // mControlView->horizontalScrollBar()->setValue(mControlView->horizontalScrollBar()->value() - dx);
mControlView->verticalScrollBar()->setValue(mControlView->verticalScrollBar()->value() - dy); // mControlView->verticalScrollBar()->setValue(mControlView->verticalScrollBar()->value() - dy);
mControlView->translate(dx, dy);
UBApplication::applicationController->adjustDisplayView(); UBApplication::applicationController->adjustDisplayView();
emit controlViewportChanged(); emit controlViewportChanged();
...@@ -1557,7 +1558,7 @@ void UBBoardController::stylusToolChanged(int tool) ...@@ -1557,7 +1558,7 @@ void UBBoardController::stylusToolChanged(int tool)
if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text) if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text)
{ {
if(mPaletteManager->mKeyboardPalette->m_isVisible) if(mPaletteManager->mKeyboardPalette->m_isVisible)
UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger); UBApplication::mainWindow->actionVirtualKeyboard->activate(QAction::Trigger);
} }
} }
......
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