mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Simplify check for _outside_buildarea
There is a getter function that has a default if the attribute doesn't exist. Contributes to issue CURA-4797.
This commit is contained in:
parent
1c605a5108
commit
5c8d46b5c2
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2015 Ultimaker B.V.
|
# Copyright (c) 2018 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import QTimer
|
from PyQt5.QtCore import QTimer
|
||||||
|
@ -57,7 +57,7 @@ class PlatformPhysics:
|
||||||
nodes = list(BreadthFirstIterator(root))
|
nodes = list(BreadthFirstIterator(root))
|
||||||
|
|
||||||
# Only check nodes inside build area.
|
# Only check nodes inside build area.
|
||||||
nodes = [node for node in nodes if (hasattr(node, "_outside_buildarea") and not node._outside_buildarea)]
|
nodes = [node for node in nodes if getattr(node, "_outside_buildarea", False)]
|
||||||
|
|
||||||
random.shuffle(nodes)
|
random.shuffle(nodes)
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue