Browse Source

Merge branch 'master' of ssh://github.com/Ultimaker/Cura

Ghostkeeper 3 years ago
parent
commit
1f012ce2e4
2 changed files with 7 additions and 3 deletions
  1. 3 0
      cura/CuraApplication.py
  2. 4 3
      cura/Scene/CuraSceneNode.py

+ 3 - 0
cura/CuraApplication.py

@@ -257,6 +257,9 @@ class CuraApplication(QtApplication):
         from cura.CuraPackageManager import CuraPackageManager
         self._package_manager_class = CuraPackageManager
 
+        from UM.CentralFileStorage import CentralFileStorage
+        CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
+
     @pyqtProperty(str, constant=True)
     def ultimakerCloudApiRootUrl(self) -> str:
         return UltimakerCloudConstants.CuraCloudAPIRoot

+ 4 - 3
cura/Scene/CuraSceneNode.py

@@ -124,13 +124,14 @@ class CuraSceneNode(SceneNode):
             if child.callDecoration("isNonPrintingMesh"):
                 # Non-printing-meshes inside a group should not affect push apart or drop to build plate
                 continue
-            if child.getBoundingBox().minimum == child.getBoundingBox().maximum:
+            child_bb = child.getBoundingBox()
+            if child_bb is None or child_bb.minimum == child_bb.maximum:
                 # Child had a degenerate bounding box, such as an empty group. Don't count it along.
                 continue
             if self._aabb is None:
-                self._aabb = child.getBoundingBox()
+                self._aabb = child_bb
             else:
-                self._aabb = self._aabb + child.getBoundingBox()
+                self._aabb = self._aabb + child_bb
 
         if self._aabb is None:  # No children that should be included? Just use your own position then, but it's an invalid AABB.
             position = self.getWorldPosition()