From 1ee8948a5c407f3c4367ade4cf6ec6094b1938d1 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 5 Dec 2018 08:49:21 +0300 Subject: [PATCH] Fix crash in unit tests. Initialize color of removed segment through the configuration object. --- src/SketchPlugin/Test/TestSplitPreview.py | 3 +++ src/SketchPlugin/Test/TestTrimPreview.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/SketchPlugin/Test/TestSplitPreview.py b/src/SketchPlugin/Test/TestSplitPreview.py index c4bb13798..6cfdf582c 100644 --- a/src/SketchPlugin/Test/TestSplitPreview.py +++ b/src/SketchPlugin/Test/TestSplitPreview.py @@ -23,6 +23,9 @@ from salome.shaper import model from ModelAPI import * from GeomDataAPI import * +from ConfigAPI import * +Config_PropManager().registerProp("Visualization", "operation_remove_feature_color", "Color of removed feature in operation", Config_Prop.Color, "255, 174, 201") + # base sketch model.begin() partSet = model.moduleDocument() diff --git a/src/SketchPlugin/Test/TestTrimPreview.py b/src/SketchPlugin/Test/TestTrimPreview.py index 0f018cf18..2361d369b 100644 --- a/src/SketchPlugin/Test/TestTrimPreview.py +++ b/src/SketchPlugin/Test/TestTrimPreview.py @@ -23,6 +23,9 @@ from salome.shaper import model from ModelAPI import * from GeomDataAPI import * +from ConfigAPI import * +Config_PropManager().registerProp("Visualization", "operation_remove_feature_color", "Color of removed feature in operation", Config_Prop.Color, "255, 174, 201") + # base sketch model.begin() partSet = model.moduleDocument() -- 2.39.2