X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ToolBox.cpp;h=27197a7edeb54d3c5474c4a9d0fb1960d54eff74;hb=ae96acd2d1db0cb0ce8eead22a829bd63aa1105b;hp=55abd049722066ca4ce7d5f461121ced65a16f69;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ToolBox.cpp b/src/ModuleBase/ModuleBase_ToolBox.cpp index 55abd0497..27197a7ed 100644 --- a/src/ModuleBase/ModuleBase_ToolBox.cpp +++ b/src/ModuleBase/ModuleBase_ToolBox.cpp @@ -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);