From e5d4bb9b2d1f0332591574c6c98c7a235f3c25cc Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 23 Jun 2020 17:06:05 +0300 Subject: [PATCH] Fix for #19722 - Field with string : impossible to save. Make strings-fields exported to SHAPERSTUDY as empty fields even they are not supported by the SHAPERSTUDY and SMESH. --- src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py b/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py index d75dd6a52..a87eb0f6f 100644 --- a/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py +++ b/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py @@ -224,7 +224,10 @@ class PublishToStudyFeature(ModelAPI.ModelAPI_Feature): def fillField(self, theField, theFeature, theEngine, theSelectionIndices): aTables = theFeature.tables("values") aValType = aTables.type() # type of the values - theField.SetValuesType(aValType) + aValTypeToSet = aValType + if aValType == 3: # strings do not supported by SMESH, so, make them empty boolean table + aValTypeToSet = 0 + theField.SetValuesType(aValTypeToSet) aNumSteps = aTables.tables() # number of steps is number of tables aSteps = [] for aVal in range(aNumSteps): -- 2.39.2