From e5b4de90132ed61202126b7b093b03c6a3143ccc Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Tue, 6 Sep 2016 14:25:16 -0400 Subject: [PATCH] When control view is reset, update the display view and the zoom palette --- src/board/UBBoardController.cpp | 4 +++- src/board/UBBoardPaletteManager.cpp | 1 + src/gui/UBZoomPalette.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index c7e1c657..04ea0d22 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -1688,8 +1688,10 @@ void UBBoardController::boardViewResized(QResizeEvent* event) mControlView->centerOn(0,0); - if (mDisplayView) + if (mDisplayView) { + UBApplication::applicationController->adjustDisplayView(); mDisplayView->centerOn(0,0); + } mPaletteManager->containerResized(); diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index bb7324d1..eff776c5 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -497,6 +497,7 @@ void UBBoardPaletteManager::containerResized() mZoomPalette->move(userLeft + userWidth - mZoomPalette->width() , userTop + userHeight /*- mPageNumberPalette->height()*/ - innerMargin - mZoomPalette->height()); mZoomPalette->adjustSizeAndPosition(); + mZoomPalette->refreshPalette(); } if (isFirstResized && mKeyboardPalette && mKeyboardPalette->parent() == UBApplication::boardController->controlContainer()) diff --git a/src/gui/UBZoomPalette.h b/src/gui/UBZoomPalette.h index 77200d6e..8b017f16 100644 --- a/src/gui/UBZoomPalette.h +++ b/src/gui/UBZoomPalette.h @@ -45,6 +45,7 @@ class UBZoomPalette : public UBFloatingPalette public slots: void hide(); + void refreshPalette(); private: UBBoardController* mBoardController; @@ -55,7 +56,6 @@ class UBZoomPalette : public UBFloatingPalette bool mIsExpanded; private slots: - void refreshPalette(); void showHideExtraButton(); void goHundred();