From 152d642b607809f2bba23d12c32fbf6314394399 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Wed, 24 Apr 2024 21:25:47 +0200 Subject: [PATCH] Draft: revert Draft WB changes from #13294 Revert the Draft WB related changes of #13294. --- src/Mod/Draft/draftfunctions/upgrade.py | 2 +- src/Mod/Draft/draftutils/gui_utils.py | 2 +- src/Mod/Draft/draftutils/utils.py | 16 ++++++++-------- src/Mod/Draft/draftviewproviders/view_layer.py | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Mod/Draft/draftfunctions/upgrade.py b/src/Mod/Draft/draftfunctions/upgrade.py index 604bd1cfe6..98c56a3a88 100644 --- a/src/Mod/Draft/draftfunctions/upgrade.py +++ b/src/Mod/Draft/draftfunctions/upgrade.py @@ -227,7 +227,7 @@ def upgrade(objects, delete=False, force=None): # of downgrade, nor do they have the same hashCode(). # Nevertheless, they still keep reference to their original # colors, capture that in facecolors. - # Also, cannot use ShapeAppearance here, we need a whole array + # Also, cannot use ShapeColor here, we need a whole array # matching the colors of the array of faces per object, # only DiffuseColor has that facecolors[0].extend(obj.ViewObject.DiffuseColor) diff --git a/src/Mod/Draft/draftutils/gui_utils.py b/src/Mod/Draft/draftutils/gui_utils.py index ed3d63b046..57c21b66f4 100644 --- a/src/Mod/Draft/draftutils/gui_utils.py +++ b/src/Mod/Draft/draftutils/gui_utils.py @@ -474,7 +474,7 @@ def format_object(target, origin=None): If construction mode is active target is then placed in the construction group and the `constr` color is applied to its applicable color properties: - TextColor, PointColor, LineColor, and ShapeAppearance. + TextColor, PointColor, LineColor, and ShapeColor. Parameters ---------- diff --git a/src/Mod/Draft/draftutils/utils.py b/src/Mod/Draft/draftutils/utils.py index 803b1a601f..4733d95cd6 100644 --- a/src/Mod/Draft/draftutils/utils.py +++ b/src/Mod/Draft/draftutils/utils.py @@ -88,14 +88,14 @@ def get_default_shape_style(): display_mode_index = params.get_param("DefaultDisplayMode") draw_style_index = params.get_param("DefaultDrawStyle") return { - "DisplayMode": ("index", display_mode_index, DISPLAY_MODES[display_mode_index]), - "DrawStyle": ("index", draw_style_index, DRAW_STYLES[draw_style_index]), - "LineColor": ("color", params.get_param_view("DefaultShapeLineColor")), - "LineWidth": ("int", params.get_param_view("DefaultShapeLineWidth")), - "PointColor": ("color", params.get_param_view("DefaultShapeVertexColor")), - "PointSize": ("int", params.get_param_view("DefaultShapePointSize")), - "ShapeColor": ("color", params.get_param_view("DefaultShapeColor")), - "Transparency": ("int", params.get_param_view("DefaultShapeTransparency")) + "DisplayMode": ("index", display_mode_index, DISPLAY_MODES[display_mode_index]), + "DrawStyle": ("index", draw_style_index, DRAW_STYLES[draw_style_index]), + "LineColor": ("color", params.get_param_view("DefaultShapeLineColor")), + "LineWidth": ("int", params.get_param_view("DefaultShapeLineWidth")), + "PointColor": ("color", params.get_param_view("DefaultShapeVertexColor")), + "PointSize": ("int", params.get_param_view("DefaultShapePointSize")), + "ShapeColor": ("color", params.get_param_view("DefaultShapeColor")), + "Transparency": ("int", params.get_param_view("DefaultShapeTransparency")) } diff --git a/src/Mod/Draft/draftviewproviders/view_layer.py b/src/Mod/Draft/draftviewproviders/view_layer.py index 064690e9f6..c86eaedf75 100644 --- a/src/Mod/Draft/draftviewproviders/view_layer.py +++ b/src/Mod/Draft/draftviewproviders/view_layer.py @@ -70,16 +70,16 @@ class ViewProviderLayer: _tip) vobj.OverrideLineColorChildren = True - if "OverrideShapeAppearanceChildren" not in properties: + if "OverrideShapeColorChildren" not in properties: _tip = QT_TRANSLATE_NOOP("App::Property", "If it is true, the objects contained " "within this layer will adopt " "the shape color of the layer") vobj.addProperty("App::PropertyBool", - "OverrideShapeAppearanceChildren", + "OverrideShapeColorChildren", "Layer", _tip) - vobj.OverrideShapeAppearanceChildren = True + vobj.OverrideShapeColorChildren = True if "UsePrintColor" not in properties: _tip = QT_TRANSLATE_NOOP("App::Property",