Translate control view instead of scrolling separately

preferencesAboutTextFull
SnowLeo 13 years ago
parent f1ad3f3b2e
commit 430042729e
  1. 9
      src/board/UBBoardController.cpp

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

Loading…
Cancel
Save