Salome HOME
Issue #2727: Avoid unlimited loop in sorting
[modules/shaper.git] / src / ModuleBase / ModuleBase_ToolBox.cpp
index 55abd049722066ca4ce7d5f461121ced65a16f69..27197a7edeb54d3c5474c4a9d0fb1960d54eff74 100644 (file)
@@ -72,8 +72,12 @@ void ModuleBase_ToolBox::addItem(QWidget* thePage, const QString& theName, const
   QToolButton* aButton = new QToolButton(myButtonsFrame);
   aButton->setFocusPolicy(Qt::StrongFocus);
   aButton->setCheckable(true);
-  aButton->setIcon(theIcon);
-  aButton->setIconSize(theIcon.size());
+  if (theIcon.isNull())
+    aButton->setText(theName);
+  else {
+    aButton->setIcon(theIcon);
+    aButton->setIconSize(theIcon.size());
+  }
   aButton->setToolTip(theName);
   aButton->setObjectName(theName);
   myButtonsGroup->addButton(aButton, anOldCount);