Browse Source

Revert "Avoid zero thickness to be shown in layer view."
I saw that with these changes, Cura crashes when loading a GCode.
This reverts commit 8dd21892d33277bec88895393f992b612b7af526.

Diego Prado Gesto 7 years ago
parent
commit
cc89ddf5f7

+ 2 - 2
plugins/SimulationView/SimulationView.py

@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Ultimaker B.V.
+# Copyright (c) 2017 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 import sys
@@ -344,7 +344,7 @@ class SimulationView(View):
                     self._max_feedrate = max(float(p.lineFeedrates.max()), self._max_feedrate)
                     self._min_feedrate = min(float(p.lineFeedrates.min()), self._min_feedrate)
                     self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness)
-                    self._min_thickness = min(float(p.lineThicknesses[numpy.nonzero(p.lineThicknesses)].min()), self._min_thickness)
+                    self._min_thickness = min(float(p.lineThicknesses.min()), self._min_thickness)
                 if max_layer_number < layer_id:
                     max_layer_number = layer_id
                 if min_layer_number > layer_id:

+ 2 - 2
plugins/SimulationView/SimulationViewProxy.py

@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Ultimaker B.V.
+# Copyright (c) 2017 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty
@@ -117,7 +117,7 @@ class SimulationViewProxy(QObject):
     def setSimulationViewType(self, layer_view_type):
         active_view = self._controller.getActiveView()
         if isinstance(active_view, SimulationView.SimulationView.SimulationView):
-            active_view.setSimulationViewType(layer_view_type)
+            active_view.setSimulationViewisinstance(layer_view_type)
 
     @pyqtSlot(result=int)
     def getSimulationViewType(self):

+ 2 - 2
plugins/SimulationView/__init__.py

@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Ultimaker B.V.
+# Copyright (c) 2017 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 from PyQt5.QtQml import qmlRegisterSingletonType
@@ -18,7 +18,7 @@ def getMetaData():
     }
 
 def createSimulationViewProxy(engine, script_engine):
-    return SimulationViewProxy.SimulationViewProxy()
+    return SimulationViewProxy.SimulatorViewProxy()
 
 def register(app):
     simulation_view = SimulationView.SimulationView()