Merge branch '3.3'

This commit is contained in:
Jack Ha 2018-04-25 16:35:20 +02:00
commit efdccb593f
3 changed files with 12 additions and 8 deletions

View file

@ -283,6 +283,13 @@ class CuraContainerStack(ContainerStack):
self._containers = new_containers self._containers = new_containers
# CURA-5281
# Some stacks can have empty definition_changes containers which will cause problems.
# Make sure that all stacks here have non-empty definition_changes containers.
if isinstance(new_containers[_ContainerIndexes.DefinitionChanges], type(self._empty_instance_container)):
from cura.Settings.CuraStackBuilder import CuraStackBuilder
CuraStackBuilder.createDefinitionChangesContainer(self, self.getId() + "_settings")
## protected: ## protected:
# Helper to make sure we emit a PyQt signal on container changes. # Helper to make sure we emit a PyQt signal on container changes.

View file

@ -302,13 +302,6 @@ class MachineManager(QObject):
## Given a global_stack, make sure that it's all valid by searching for this quality group and applying it again ## Given a global_stack, make sure that it's all valid by searching for this quality group and applying it again
def _initMachineState(self, global_stack): def _initMachineState(self, global_stack):
# Some stacks can have empty definition_changes containers which will cause problems.
# Make sure that all stacks here have non-empty definition_changes containers.
for stack in [global_stack] + list(global_stack.extruders.values()):
if isinstance(stack.definitionChanges, type(self._empty_container)):
from cura.Settings.CuraStackBuilder import CuraStackBuilder
CuraStackBuilder.createDefinitionChangesContainer(stack, stack.getId() + "_settings")
material_dict = {} material_dict = {}
for position, extruder in global_stack.extruders.items(): for position, extruder in global_stack.extruders.items():
material_dict[position] = extruder.material.getMetaDataEntry("base_file") material_dict[position] = extruder.material.getMetaDataEntry("base_file")

View file

@ -309,8 +309,12 @@ class PluginBrowser(QObject, Extension):
try: try:
plugin_object = self._plugin_registry.getPluginObject(plugin_id) plugin_object = self._plugin_registry.getPluginObject(plugin_id)
except PluginNotFoundError: except PluginNotFoundError:
# CURA-5287
# At this point, we know that this plugin is installed because it passed the previous check, but we cannot
# get the PluginObject. This means there is a bug in the plugin or something. So, we always allow to upgrade
# this plugin and hopefully that fixes it.
Logger.log("w", "Could not find plugin %s", plugin_id) Logger.log("w", "Could not find plugin %s", plugin_id)
return False return True
# Scan plugin server data for plugin with the given id: # Scan plugin server data for plugin with the given id:
for plugin in self._plugins_metadata: for plugin in self._plugins_metadata: