From aa7dddeecc890623456aae28faca5c5010e2fd24 Mon Sep 17 00:00:00 2001 From: carlopav Date: Mon, 24 May 2021 23:10:55 +0200 Subject: [PATCH] Draft: Edit, Remove all the empty pass functions Remove unused functions. Since GuiTools objects inherit from the GuiTools class, they do not need those placeholders. --- .../draftguitools/gui_edit_arch_objects.py | 37 ------------------- .../draftguitools/gui_edit_draft_objects.py | 24 ------------ .../draftguitools/gui_edit_part_objects.py | 30 --------------- .../gui_edit_sketcher_objects.py | 7 ---- 4 files changed, 98 deletions(-) diff --git a/src/Mod/Draft/draftguitools/gui_edit_arch_objects.py b/src/Mod/Draft/draftguitools/gui_edit_arch_objects.py index 7986f06c1c..18264309ec 100644 --- a/src/Mod/Draft/draftguitools/gui_edit_arch_objects.py +++ b/src/Mod/Draft/draftguitools/gui_edit_arch_objects.py @@ -73,12 +73,6 @@ class ArchWallGuiTools(GuiTools): if vz.Length > 0: obj.Height = vz.Length - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class ArchWindowGuiTools(GuiTools): @@ -112,12 +106,6 @@ class ArchWindowGuiTools(GuiTools): for obj in obj.Hosts: obj.recompute() - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class ArchStructureGuiTools(GuiTools): @@ -138,12 +126,6 @@ class ArchStructureGuiTools(GuiTools): nodes[node_idx] = v obj.Nodes = nodes - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - def get_object_style(self, obj): return (obj.ViewObject.DisplayMode, obj.ViewObject.NodeSize, @@ -177,12 +159,6 @@ class ArchSpaceGuiTools(GuiTools): if node_idx == 0: obj.ViewObject.TextPosition = v - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class ArchPanelCutGuiTools(GuiTools): @@ -202,12 +178,6 @@ class ArchPanelCutGuiTools(GuiTools): if node_idx == 0: obj.TagPosition = v - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class ArchPanelSheetGuiTools(GuiTools): @@ -227,11 +197,4 @@ class ArchPanelSheetGuiTools(GuiTools): else: obj.Group[node_idx-1].Placement.Base = v - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - - ## @} diff --git a/src/Mod/Draft/draftguitools/gui_edit_draft_objects.py b/src/Mod/Draft/draftguitools/gui_edit_draft_objects.py index f09c902e46..b8e986e057 100644 --- a/src/Mod/Draft/draftguitools/gui_edit_draft_objects.py +++ b/src/Mod/Draft/draftguitools/gui_edit_draft_objects.py @@ -176,12 +176,6 @@ class DraftRectangleGuiTools(GuiTools): elif node_idx == 2: obj.Height = DraftVecUtils.project(v, App.Vector(0,1,0)).Length - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class DraftCircleGuiTools(GuiTools): @@ -414,12 +408,6 @@ class DraftEllipseGuiTools(GuiTools): else: obj.MinorRadius = obj.MajorRadius - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class DraftPolygonGuiTools(GuiTools): @@ -444,12 +432,6 @@ class DraftPolygonGuiTools(GuiTools): obj.Radius = v.Length obj.recompute() - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class DraftDimensionGuiTools(GuiTools): @@ -475,12 +457,6 @@ class DraftDimensionGuiTools(GuiTools): elif node_idx == 3: obj.ViewObject.TextPosition = v - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class DraftBezCurveGuiTools(GuiTools): diff --git a/src/Mod/Draft/draftguitools/gui_edit_part_objects.py b/src/Mod/Draft/draftguitools/gui_edit_part_objects.py index 456aea26bb..2a1d7e647d 100644 --- a/src/Mod/Draft/draftguitools/gui_edit_part_objects.py +++ b/src/Mod/Draft/draftguitools/gui_edit_part_objects.py @@ -57,12 +57,6 @@ class PartLineGuiTools(GuiTools): obj.Y2 = v.y obj.Z2 = v.z - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class PartBoxGuiTools(GuiTools): @@ -90,12 +84,6 @@ class PartBoxGuiTools(GuiTools): _vector = DraftVecUtils.project(v, App.Vector(0, 0, 1)) obj.Height = _vector.Length - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class PartCylinderGuiTools(GuiTools): @@ -119,12 +107,6 @@ class PartCylinderGuiTools(GuiTools): _vector = DraftVecUtils.project(v, App.Vector(0, 0, 1)) obj.Height = _vector.Length - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class PartConeGuiTools(GuiTools): @@ -151,12 +133,6 @@ class PartConeGuiTools(GuiTools): _vector = DraftVecUtils.project(v, App.Vector(0, 0, 1)) obj.Height = _vector.Length - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - class PartSphereGuiTools(GuiTools): @@ -176,10 +152,4 @@ class PartSphereGuiTools(GuiTools): if v.Length > 0.0: obj.Radius = v.Length # TODO: Perhaps better to project on the face? - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - ## @} diff --git a/src/Mod/Draft/draftguitools/gui_edit_sketcher_objects.py b/src/Mod/Draft/draftguitools/gui_edit_sketcher_objects.py index bd11f40159..e62b8d7792 100644 --- a/src/Mod/Draft/draftguitools/gui_edit_sketcher_objects.py +++ b/src/Mod/Draft/draftguitools/gui_edit_sketcher_objects.py @@ -75,11 +75,4 @@ class SketcherSketchObjectGuiTools(GuiTools): obj.movePoint(0, 2, v) obj.recompute() - def get_edit_point_context_menu(self, obj, node_idx): - pass - - def evaluate_context_menu_action(self, edit_command, obj, node_idx, action): - pass - - ## @}