From 4f4c2e47cc92c0cc143b4e127ab3f28ac29b3379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Fri, 1 Apr 2022 16:19:24 +0200 Subject: [PATCH] fixed an issue where buttons corresponding to saved pen width and eraser width would not be checked (at start) --- src/board/UBBoardController.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 5768591e..c2902620 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -346,6 +346,8 @@ void UBBoardController::setupToolbar() , lineWidthChoice, SLOT(setCurrentIndex(int))); lineWidthChoice->displayText(QVariant(settings->appToolBarDisplayText->get().toBool())); + lineWidthChoice->setCurrentIndex(settings->penWidthIndex()); + lineWidthActions.at(settings->penWidthIndex())->setChecked(true); mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, lineWidthChoice); @@ -367,6 +369,7 @@ void UBBoardController::setupToolbar() eraserWidthChoice->displayText(QVariant(settings->appToolBarDisplayText->get().toBool())); eraserWidthChoice->setCurrentIndex(settings->eraserWidthIndex()); + eraserWidthActions.at(settings->eraserWidthIndex())->setChecked(true); mMainWindow->boardToolBar->insertSeparator(mMainWindow->actionBackgrounds);