mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
T466: Fixed Nothing to slice bug
This commit is contained in:
parent
2b2eec5643
commit
be3a945fb0
3 changed files with 33 additions and 43 deletions
|
@ -541,13 +541,10 @@ class CuraApplication(QtApplication):
|
|||
def loadFile(self, file):
|
||||
scene = self.getController().getScene()
|
||||
|
||||
def findAny():
|
||||
for node1 in DepthFirstIterator(scene.getRoot()):
|
||||
if hasattr(node1, "gcode") and getattr(node1, "gcode") is True:
|
||||
return True
|
||||
return False
|
||||
if findAny():
|
||||
self.deleteAll()
|
||||
for node1 in DepthFirstIterator(scene.getRoot()):
|
||||
if hasattr(node1, "gcode") and getattr(node1, "gcode") is True:
|
||||
self.deleteAll()
|
||||
break
|
||||
|
||||
if not file.isValid():
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue