}
}
- QString aToolTip = QString::fromStdString(theData->widgetTooltip());
+ QString aToolTip = translate(theData->widgetTooltip());
QString anObjName = QString::fromStdString(attributeID());
myListView = new ModuleBase_ListView(this, anObjName, aToolTip);
connect(myListView->getControl(), SIGNAL(itemSelectionChanged()), SLOT(onListSelection()));
if (aType == ModelAPI_AttributeSelectionList::typeId()) {
// Restore shape type
std::string aSelectionType = aSelectionListAttr->selectionType().c_str();
- if (!aSelectionType.empty()) {
+ if (aSelectionType.empty())
+ aSelectionListAttr->setSelectionType(myDefMode);
+ else {
setCurrentShapeType(ModuleBase_Tools::shapeType(aSelectionType.c_str()));
myDefMode = aSelectionType;
myIsFirst = false;
}
// We have to call repaint because sometimes the List control is not updated
- myListView->getControl()->repaint();
+ myListView->getControl()->update();
}
//********************************************************************