From b0a9d17dc34d06d7137772c7ef065e682218cdf1 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 31 Jul 2014 13:26:23 +0200 Subject: [PATCH] use name as a tooltip if no tooltip is given for scene tool bar toggle buttons --- apps/opencs/view/widget/scenetooltoggle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/opencs/view/widget/scenetooltoggle.cpp b/apps/opencs/view/widget/scenetooltoggle.cpp index 1737bbfc79..b940a5cb0d 100644 --- a/apps/opencs/view/widget/scenetooltoggle.cpp +++ b/apps/opencs/view/widget/scenetooltoggle.cpp @@ -143,7 +143,8 @@ void CSVWidget::SceneToolToggle::addButton (const std::string& icon, unsigned in throw std::runtime_error ("Exceeded number of buttons in toggle type tool"); PushButton *button = new PushButton (QIcon (QPixmap (icon.c_str())), - PushButton::Type_Toggle, tooltip, mPanel); + PushButton::Type_Toggle, tooltip.isEmpty() ? name: tooltip, mPanel); + button->setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed)); button->setIconSize (QSize (mIconSize, mIconSize)); button->setFixedSize (mButtonSize, mButtonSize);