From: nds Date: Tue, 20 Jan 2015 09:32:55 +0000 (+0300) Subject: Issue #336 Create/Edit Line -filter for first and last point fields X-Git-Tag: V_1.0.0~22^2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68d177abdffa42fcba2e40413588b67dadd44b11;p=modules%2Fshaper.git Issue #336 Create/Edit Line -filter for first and last point fields It corrects the displayed name for the selection attribute. The sketch feature vertices can be selected in the shape selector control. --- diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index bea20b3fc..e57640745 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -365,12 +365,19 @@ bool ModuleBase_WidgetShapeSelector::acceptObjectType(const ObjectPtr theObject) //******************************************************************** void ModuleBase_WidgetShapeSelector::updateSelectionName() { - if (mySelectedObject) { - std::string aName = mySelectedObject->data()->name(); - myTextLine->setText(QString::fromStdString(aName)); - } else { - if (myIsActive) { - myTextLine->setText(""); + DataPtr aData = myFeature->data(); + AttributeSelectionPtr aSelect = aData->selection(attributeID()); + if (aSelect) { + myTextLine->setText(QString::fromStdString(aSelect->namingName())); + } + else { + if (mySelectedObject) { + std::string aName = mySelectedObject->data()->name(); + myTextLine->setText(QString::fromStdString(aName)); + } else { + if (myIsActive) { + myTextLine->setText(""); + } } } }