|
@@ -98,11 +98,14 @@ class SimulationView(View):
|
|
|
|
|
|
self._solid_layers = int(Preferences.getInstance().getValue("view/top_layer_count"))
|
|
self._solid_layers = int(Preferences.getInstance().getValue("view/top_layer_count"))
|
|
self._only_show_top_layers = bool(Preferences.getInstance().getValue("view/only_show_top_layers"))
|
|
self._only_show_top_layers = bool(Preferences.getInstance().getValue("view/only_show_top_layers"))
|
|
- self._compatibility_mode = True # for safety
|
|
|
|
|
|
+ self._compatibility_mode = self._evaluateCompatibilityMode()
|
|
|
|
|
|
self._wireprint_warning_message = Message(catalog.i18nc("@info:status", "Cura does not accurately display layers when Wire Printing is enabled"),
|
|
self._wireprint_warning_message = Message(catalog.i18nc("@info:status", "Cura does not accurately display layers when Wire Printing is enabled"),
|
|
title = catalog.i18nc("@info:title", "Simulation View"))
|
|
title = catalog.i18nc("@info:title", "Simulation View"))
|
|
|
|
|
|
|
|
+ def _evaluateCompatibilityMode(self):
|
|
|
|
+ return OpenGLContext.isLegacyOpenGL() or bool(Preferences.getInstance().getValue("view/force_layer_view_compatibility_mode"))
|
|
|
|
+
|
|
def _resetSettings(self):
|
|
def _resetSettings(self):
|
|
self._layer_view_type = 0 # 0 is material color, 1 is color by linetype, 2 is speed, 3 is layer thickness
|
|
self._layer_view_type = 0 # 0 is material color, 1 is color by linetype, 2 is speed, 3 is layer thickness
|
|
self._extruder_count = 0
|
|
self._extruder_count = 0
|
|
@@ -127,7 +130,7 @@ class SimulationView(View):
|
|
# Currently the RenderPass constructor requires a size > 0
|
|
# Currently the RenderPass constructor requires a size > 0
|
|
# This should be fixed in RenderPass's constructor.
|
|
# This should be fixed in RenderPass's constructor.
|
|
self._layer_pass = SimulationPass(1, 1)
|
|
self._layer_pass = SimulationPass(1, 1)
|
|
- self._compatibility_mode = OpenGLContext.isLegacyOpenGL() or bool(Preferences.getInstance().getValue("view/force_layer_view_compatibility_mode"))
|
|
|
|
|
|
+ self._compatibility_mode = self._evaluateCompatibilityMode()
|
|
self._layer_pass.setSimulationView(self)
|
|
self._layer_pass.setSimulationView(self)
|
|
return self._layer_pass
|
|
return self._layer_pass
|
|
|
|
|
|
@@ -534,8 +537,7 @@ class SimulationView(View):
|
|
def _updateWithPreferences(self):
|
|
def _updateWithPreferences(self):
|
|
self._solid_layers = int(Preferences.getInstance().getValue("view/top_layer_count"))
|
|
self._solid_layers = int(Preferences.getInstance().getValue("view/top_layer_count"))
|
|
self._only_show_top_layers = bool(Preferences.getInstance().getValue("view/only_show_top_layers"))
|
|
self._only_show_top_layers = bool(Preferences.getInstance().getValue("view/only_show_top_layers"))
|
|
- self._compatibility_mode = OpenGLContext.isLegacyOpenGL() or bool(
|
|
|
|
- Preferences.getInstance().getValue("view/force_layer_view_compatibility_mode"))
|
|
|
|
|
|
+ self._compatibility_mode = self._evaluateCompatibilityMode()
|
|
|
|
|
|
self.setSimulationViewType(int(float(Preferences.getInstance().getValue("layerview/layer_view_type"))));
|
|
self.setSimulationViewType(int(float(Preferences.getInstance().getValue("layerview/layer_view_type"))));
|
|
|
|
|