From 7502992e4b6bb1ee50dbb8dd0443e44cc0595c84 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 29 Dec 2016 10:44:41 +0300 Subject: [PATCH] Issue #1904: Nullify values on change field type --- src/CollectionPlugin/CollectionPlugin_WidgetField.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp index 8e0f85d42..a9e83048f 100644 --- a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp +++ b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp @@ -876,10 +876,7 @@ void CollectionPlugin_WidgetField::onFieldTypeChanged(int theIdx) switch (theIdx) { case ModelAPI_AttributeTables::DOUBLE: case ModelAPI_AttributeTables::INTEGER: - if ((aOldType == ModelAPI_AttributeTables::BOOLEAN) || - (aOldType == ModelAPI_AttributeTables::STRING)) { - aTable->item(j, i)->setText("0"); - } + aTable->item(j, i)->setText("0"); break; case ModelAPI_AttributeTables::BOOLEAN: aTable->item(j, i)->setText(MYFalse); -- 2.39.2