From e76df5f4d39afe5a2f0bfa7db2da400d4061900e Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 26 May 2018 11:53:08 +0200 Subject: [PATCH] minor tooltip fixes --- .../view/widget/scenetooltexturebrush.cpp | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/apps/opencs/view/widget/scenetooltexturebrush.cpp b/apps/opencs/view/widget/scenetooltexturebrush.cpp index d6df4e9f9..dab6a2850 100644 --- a/apps/opencs/view/widget/scenetooltexturebrush.cpp +++ b/apps/opencs/view/widget/scenetooltexturebrush.cpp @@ -252,28 +252,38 @@ CSVWidget::SceneToolTextureBrush::SceneToolTextureBrush (SceneToolbar *parent, c void CSVWidget::SceneToolTextureBrush::setButtonIcon (int brushShape) { - QString tooltip = "Brush settings

Currently selected: "; - if(brushShape == 0) + QString tooltip = "Change brush settings

Currently selected: "; + + switch (brushShape) { - setIcon (QIcon (QPixmap (":scenetoolbar/brush-point"))); - tooltip += dynamic_cast (mTextureBrushWindow->toolTipPoint); - } - if(brushShape == 1) - { - setIcon (QIcon (QPixmap (":scenetoolbar/brush-square"))); - tooltip += dynamic_cast (mTextureBrushWindow->toolTipSquare); - } - if(brushShape == 2) - { - setIcon (QIcon (QPixmap (":scenetoolbar/brush-circle"))); - tooltip += dynamic_cast (mTextureBrushWindow->toolTipCircle); - } - if(brushShape == 3) - { - setIcon (QIcon (QPixmap (":scenetoolbar/brush-custom"))); - tooltip += dynamic_cast (mTextureBrushWindow->toolTipCustom); + case 0: + + setIcon (QIcon (QPixmap (":scenetoolbar/brush-point"))); + tooltip += mTextureBrushWindow->toolTipPoint; + break; + + case 1: + + setIcon (QIcon (QPixmap (":scenetoolbar/brush-square"))); + tooltip += mTextureBrushWindow->toolTipSquare; + break; + + case 2: + + setIcon (QIcon (QPixmap (":scenetoolbar/brush-circle"))); + tooltip += mTextureBrushWindow->toolTipCircle; + break; + + case 3: + + setIcon (QIcon (QPixmap (":scenetoolbar/brush-custom"))); + tooltip += mTextureBrushWindow->toolTipCustom; + break; } + tooltip += "

(right click to access of previously used brush settings)"; + + CSMWorld::IdCollection& landtexturesCollection = mDocument.getData().getLandTextures(); int landTextureFilename = landtexturesCollection.findColumnIndex(CSMWorld::Columns::ColumnId_Texture);