X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetShapeSelector.cpp;h=4db52fd2a7171f6e309d193870a09856fa1c26cd;hb=450d1bd65c11870d3942a30164518037b9a7503e;hp=a697080947295db2a8d61800cd8504386322719f;hpb=1a0d48211014d96db9125fe973eacbae895c4490;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index a69708094..4db52fd2a 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -13,14 +13,11 @@ #include #include -#include - #include #include #include #include #include -#include #include #include @@ -37,7 +34,6 @@ #include #include #include -#include #include #include @@ -85,11 +81,14 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen QString aToolTip = QString::fromStdString(theData->widgetTooltip()); myTextLine = new QLineEdit(this); + QString anObjName = QString::fromStdString(attributeID()); + myTextLine->setObjectName(anObjName); myTextLine->setReadOnly(true); myTextLine->setToolTip(aToolTip); myTextLine->installEventFilter(this); aLayout->addRow(myLabel, myTextLine); + myLabel->setToolTip(aToolTip); std::string aTypes = theData->getProperty("shape_types"); myShapeTypes = QString(aTypes.c_str()).split(' ', QString::SkipEmptyParts); @@ -143,7 +142,7 @@ QList ModuleBase_WidgetShapeSelector::getAttributeSelectio DataPtr aData = myFeature->data(); AttributePtr anAttribute = myFeature->attribute(attributeID()); - ObjectPtr anObject = GeomValidators_Tools::getObject(anAttribute); + ObjectPtr anObject = ModuleBase_Tools::getObject(anAttribute); TopoDS_Shape aShape; std::shared_ptr aShapePtr = getShape(); if (aShapePtr.get()) { @@ -163,7 +162,7 @@ void ModuleBase_WidgetShapeSelector::clearAttribute() } //******************************************************************** -bool ModuleBase_WidgetShapeSelector::restoreValue() +bool ModuleBase_WidgetShapeSelector::restoreValueCustom() { bool isBlocked = this->blockSignals(true); updateSelectionName(); @@ -224,7 +223,7 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName() isNameUpdated = true; } if (!isNameUpdated) { - ObjectPtr anObject = GeomValidators_Tools::getObject(myFeature->attribute(attributeID())); + ObjectPtr anObject = ModuleBase_Tools::getObject(myFeature->attribute(attributeID())); if (anObject.get() != NULL) { std::string aName = anObject->data()->name(); myTextLine->setText(QString::fromStdString(aName)); @@ -249,10 +248,12 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName() //******************************************************************** void ModuleBase_WidgetShapeSelector::storeAttributeValue() { + ModuleBase_WidgetValidated::storeAttributeValue(); + DataPtr aData = myFeature->data(); AttributePtr anAttribute = myFeature->attribute(attributeID()); - myObject = GeomValidators_Tools::getObject(anAttribute); + myObject = ModuleBase_Tools::getObject(anAttribute); myShape = getShape(); myRefAttribute = AttributePtr(); myIsObject = false; @@ -266,6 +267,8 @@ void ModuleBase_WidgetShapeSelector::storeAttributeValue() //******************************************************************** void ModuleBase_WidgetShapeSelector::restoreAttributeValue(bool theValid) { + ModuleBase_WidgetValidated::restoreAttributeValue(theValid); + DataPtr aData = myFeature->data(); AttributePtr anAttribute = myFeature->attribute(attributeID());