Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #2727: Avoid unlimited loop in sorting
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_ToolBox.cpp
diff --git
a/src/ModuleBase/ModuleBase_ToolBox.cpp
b/src/ModuleBase/ModuleBase_ToolBox.cpp
index 55abd049722066ca4ce7d5f461121ced65a16f69..27197a7edeb54d3c5474c4a9d0fb1960d54eff74 100644
(file)
--- 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);
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);
aButton->setToolTip(theName);
aButton->setObjectName(theName);
myButtonsGroup->addButton(aButton, anOldCount);