From 99e8878cbc658444a8de6f9b2fd19c40b1eb7665 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 25 Jun 2014 17:26:50 +0400 Subject: [PATCH] refs #80 - Sketch base GUI: create/draw point, circle and arc 1. A fix for the circle object. --- src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp | 3 ++- src/PartSet/PartSet_OperationFeatureCreate.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 36ebe04f1..e4a2505f3 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -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); diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index 5b22f3fac..05c00f017 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -307,7 +307,8 @@ FeaturePtr PartSet_OperationFeatureCreate::createFeature(const bool theFlushMess bool PartSet_OperationFeatureCreate::isPointWidget() const { - return dynamic_cast(myActiveWidget); + return dynamic_cast(myActiveWidget) || + dynamic_cast(myActiveWidget); } bool PartSet_OperationFeatureCreate::setWidgetPoint(double theX, double theY) -- 2.39.2