Salome HOME
#1465 Fatal error when Build Wire
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetAction.cpp
index 84b5ceb649311f270492eb98371decc8fec1b311..c9cffda3158404a4df56651b506c49c9e4aa3f3f 100755 (executable)
@@ -26,11 +26,11 @@ ModuleBase_WidgetAction::ModuleBase_WidgetAction(QWidget* theParent,
   myActionID = attributeID();
   setAttributeID("");
 
+  myButton = new QToolButton(this);
   QString aText = QString::fromStdString(theData->widgetLabel());
   QString aToolTip = ModuleBase_Tools::wrapTextByWords(
               QString::fromStdString(theData->widgetTooltip()), myButton, DEFAULT_TOOL_TIP_WIDTH);
 
-  myButton = new QToolButton(this);
   myButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
   aControlLay->addWidget(myButton);