mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:55:56 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
ce53e56967
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user