From 11f61fc08509f248d5824377c60799ccc1f83604 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 24 Jun 2014 19:21:37 +0400 Subject: [PATCH] Set word wrap for long labels --- src/ModuleBase/ModuleBase_WidgetFactory.cpp | 1 + src/PartSet/PartSet_OperationFeatureCreate.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.cpp b/src/ModuleBase/ModuleBase_WidgetFactory.cpp index e122c5250..a88a30860 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFactory.cpp @@ -100,6 +100,7 @@ QWidget* ModuleBase_WidgetFactory::labelControl(QWidget* theParent) QWidget* result = new QWidget(theParent); QVBoxLayout* aLabelLay = new QVBoxLayout(result); QLabel* aLabel = new QLabel(result); + aLabel->setWordWrap(true); aLabel->setText(qs(myWidgetApi->getProperty(INFO_WDG_TEXT))); aLabel->setToolTip(qs(myWidgetApi->getProperty(INFO_WDG_TOOLTIP))); aLabelLay->addWidget(aLabel); diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index 27c0e0689..d3e9c45f6 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -104,7 +104,7 @@ void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle return; } - double aX, anY; + double aX = 0, anY = 0; gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theView); if (theSelected.empty()) { -- 2.39.2