Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetRadiobox.cpp
index cf93559565c01d321f0949e65b2514e13bd819f6..f939ad513bcde9b2e3a1aecdf057bb2ba3ab8289 100644 (file)
@@ -46,15 +46,23 @@ ModuleBase_WidgetRadiobox::~ModuleBase_WidgetRadiobox()
 int ModuleBase_WidgetRadiobox::addPage(ModuleBase_PageBase* thePage,
                                         const QString& theName,
                                         const QString& theCaseId,
-                                        const QPixmap& theIcon)
+                                        const QPixmap& theIcon,
+                                        const QString& theTooltip)
 {
-  ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon);
+  ModuleBase_PagedContainer::addPage(thePage, theName, theCaseId, theIcon, theTooltip);
   QWidget* aWgt = new QWidget(this);
   QVBoxLayout* aLay = new QVBoxLayout(aWgt);
   aLay->setContentsMargins(0, 0, 0, 0);
 
-  QRadioButton* aButton = new QRadioButton(aWgt);
-  aButton->setToolTip(theName);
+  QRadioButton* aButton;
+  if (theIcon.isNull()) {
+    aButton = new QRadioButton(theName, aWgt);
+    aButton->setToolTip(theTooltip);
+  }
+  else {
+    aButton = new QRadioButton(aWgt);
+    aButton->setToolTip(theName);
+  }
   aLay->addStretch();
   aLay->addWidget(aButton);
   aLay->addStretch();