Skip to content

Commit

Permalink
fix redundant error messages. issue #402
Browse files Browse the repository at this point in the history
  • Loading branch information
shaise committed Nov 21, 2024
1 parent 1c4f212 commit f5a437c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ExtrudedCutout.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ def _addProperties(self, obj):
)

def onChanged(self, fp, prop):
'''Respond to property changes'''
if prop in ["Sketch", "SelectedFace", "ExtrusionLength1", "ExtrusionLength2", "CutSide", "CutType", "Refine"]:
App.ActiveDocument.recompute() # Trigger a recompute when these properties change

'''Respond to property changes'''
# Show or hide length properties based in the CutType property:
if prop == "CutType":
if fp.CutType == "Through everything both sides":
Expand All @@ -67,9 +64,9 @@ def execute(self, fp):

try:
# Debug: Print the values of Sketch, SelectedFace, and CutSide
App.Console.PrintMessage(f"Sketch: {fp.Sketch}\n")
App.Console.PrintMessage(f"SelectedFace: {fp.SelectedFace}\n")
App.Console.PrintMessage(f"CutSide: {fp.CutSide}\n")
# App.Console.PrintMessage(f"Sketch: {fp.Sketch}\n")
# App.Console.PrintMessage(f"SelectedFace: {fp.SelectedFace}\n")
# App.Console.PrintMessage(f"CutSide: {fp.CutSide}\n")

# Ensure the Sketch and SelectedFace properties are valid
if fp.Sketch is None or fp.SelectedFace is None:
Expand Down

0 comments on commit f5a437c

Please sign in to comment.