]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
authornds <natalia.donis@opencascade.com>
Wed, 25 Jun 2014 13:26:50 +0000 (17:26 +0400)
committernds <natalia.donis@opencascade.com>
Wed, 25 Jun 2014 13:26:50 +0000 (17:26 +0400)
1. A fix for the circle object.

src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/PartSet/PartSet_OperationFeatureCreate.cpp

index 36ebe04f19e922ea3335fc2633f351b97f9b6586..e4a2505f31a39ec2f3953f503d91bc11bc092528 100644 (file)
@@ -35,7 +35,8 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, c
   QString aLabelText = QString::fromStdString(theData->widgetLabel());
   QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
   myLabel = new QLabel(aLabelText, myContainer);
-  myLabel->setPixmap(QPixmap(aLabelIcon));
+  if (!aLabelIcon.isEmpty())
+    myLabel->setPixmap(QPixmap(aLabelIcon));
   aControlLay->addWidget(myLabel);
 
   mySpinBox = new QDoubleSpinBox(myContainer);
index 5b22f3face29eb2bd73c5150340e21611d237e30..05c00f017d361a68d9bf4e49180ed021db3ae2fc 100644 (file)
@@ -307,7 +307,8 @@ FeaturePtr PartSet_OperationFeatureCreate::createFeature(const bool theFlushMess
 
 bool PartSet_OperationFeatureCreate::isPointWidget() const
 {
-  return dynamic_cast<ModuleBase_WidgetPoint2D*>(myActiveWidget);
+  return dynamic_cast<ModuleBase_WidgetPoint2D*>(myActiveWidget) ||
+         dynamic_cast<ModuleBase_WidgetPoint2dDistance*>(myActiveWidget);
 }
 
 bool PartSet_OperationFeatureCreate::setWidgetPoint(double theX, double theY)