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

This commit is contained in:
Jaime van Kessel 2020-07-13 14:12:30 +02:00
commit ce53e56967
No known key found for this signature in database
GPG key ID: 3710727397403C91
2 changed files with 9 additions and 1 deletions

View file

@ -202,7 +202,11 @@ class PrintInformation(QObject):
self._material_costs[build_plate_number] = []
self._material_names[build_plate_number] = []
material_preference_values = json.loads(self._application.getInstance().getPreferences().getValue("cura/material_settings"))
try:
material_preference_values = json.loads(self._application.getInstance().getPreferences().getValue("cura/material_settings"))
except json.JSONDecodeError:
Logger.warning("Material preference values are corrupt. Will revert to defaults!")
material_preference_values = {}
for index, extruder_stack in enumerate(global_stack.extruderList):
if index >= len(self._material_amounts):

View file

@ -78,6 +78,10 @@ Item
{
base.activeY = y;
}
//Clear focus when tools change. This prevents the tool grabbing focus when activated.
//Grabbing focus prevents items from being deleted.
//Apparently this was only a problem on MacOS.
forceActiveFocus();
}
//Workaround since using ToolButton's onClicked would break the binding of the checked property, instead