Skip to content

Commit

Permalink
Rename "clear" method to "clearDecoratorData"
Browse files Browse the repository at this point in the history
The "clear" method has been renamed to "clearDecoratorData" to improve clarity on its function in several classes. This change affects the SettingOverrideDecorator, SceneNodeDecorator, ConvexHullDecorator, and SceneNode classes.

CURA-11658
  • Loading branch information
saumyaj3 committed Apr 22, 2024
1 parent afc5f50 commit cf7378d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UM/Scene/SceneNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def getDecorator(self, dec_type: type) -> Optional[SceneNodeDecorator]:
def removeDecorators(self):
"""Remove all decorators"""
for decorator in self._decorators:
decorator.clear()
decorator.clearDecoratorData()
self._decorators = []
self.decoratorsChanged.emit(self)

Expand Down
2 changes: 1 addition & 1 deletion UM/Scene/SceneNodeDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setNode(self, node: "SceneNode") -> None:
def getNode(self) -> Optional["SceneNode"]:
return self._node

def clear(self) -> None:
def clearDecoratorData(self) -> None:
"""Clear all data associated with this decorator. This will be called before the decorator is removed"""
self._node = None

Expand Down

0 comments on commit cf7378d

Please sign in to comment.