mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
CURA-4400 fixed merge conflicts
This commit is contained in:
commit
bad637eb14
121 changed files with 1157 additions and 936 deletions
|
|
@ -1082,6 +1082,12 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
CuraApplication.getInstance().getMachineManager().activeQualityChanged.emit()
|
||||
|
||||
# Actually change the active machine.
|
||||
#
|
||||
# This is scheduled for later is because it depends on the Variant/Material/Qualitiy Managers to have the latest
|
||||
# data, but those managers will only update upon a container/container metadata changed signal. Because this
|
||||
# function is running on the main thread (Qt thread), although those "changed" signals have been emitted, but
|
||||
# they won't take effect until this function is done.
|
||||
# To solve this, we schedule _updateActiveMachine() for later so it will have the latest data.
|
||||
CuraApplication.getInstance().callLater(self._updateActiveMachine, global_stack)
|
||||
|
||||
# Load all the nodes / meshdata of the workspace
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@ UM.TooltipArea
|
|||
if(checked)
|
||||
{
|
||||
addedSettingsModel.setVisible(model.key, checked);
|
||||
UM.ActiveTool.triggerAction("subscribeForSettingValidation", model.key)
|
||||
UM.ActiveTool.triggerActionWithData("subscribeForSettingValidation", model.key)
|
||||
}
|
||||
else
|
||||
{
|
||||
UM.ActiveTool.triggerAction("unsubscribeForSettingValidation", model.key)
|
||||
UM.ActiveTool.triggerActionWithData("unsubscribeForSettingValidation", model.key)
|
||||
addedSettingsModel.setVisible(model.key, checked);
|
||||
}
|
||||
UM.ActiveTool.forceUpdate();
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ Item {
|
|||
|
||||
onClicked: {
|
||||
addedSettingsModel.setVisible(model.key, false)
|
||||
UM.ActiveTool.triggerAction("unsubscribeForSettingValidation", model.key)
|
||||
UM.ActiveTool.triggerActionWithData("unsubscribeForSettingValidation", model.key)
|
||||
}
|
||||
|
||||
style: ButtonStyle
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ class PerObjectSettingsTool(Tool):
|
|||
self._error_check_timer.setSingleShot(True)
|
||||
self._error_check_timer.timeout.connect(self._updateStacksHaveErrors)
|
||||
|
||||
|
||||
def event(self, event):
|
||||
super().event(event)
|
||||
if event.type == Event.MousePressEvent and self._controller.getToolsEnabled():
|
||||
|
|
@ -156,10 +155,12 @@ class PerObjectSettingsTool(Tool):
|
|||
|
||||
def _onPropertyChanged(self, key: str, property_name: str) -> None:
|
||||
if property_name == "validationState":
|
||||
self._error_check_timer.start()
|
||||
# self._error_check_timer.start()
|
||||
return
|
||||
|
||||
def _updateStacksHaveErrors(self) -> None:
|
||||
self._checkStacksHaveErrors()
|
||||
return
|
||||
# self._checkStacksHaveErrors()
|
||||
|
||||
|
||||
def _checkStacksHaveErrors(self):
|
||||
|
|
@ -180,6 +181,7 @@ class PerObjectSettingsTool(Tool):
|
|||
|
||||
|
||||
def _checkStackForErrors(self, stack):
|
||||
print("checking for errors")
|
||||
if stack is None:
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
|
||||
## Overridden from InstanceContainer
|
||||
# set the meta data for all machine / variant combinations
|
||||
#
|
||||
# The "apply_to_all" flag indicates whether this piece of metadata should be applied to all material containers
|
||||
# or just this specific container.
|
||||
# For example, when you change the material name, you want to apply it to all its derived containers, but for
|
||||
# some specific settings, they should only be applied to a machine/variant-specific container.
|
||||
#
|
||||
def setMetaDataEntry(self, key, value, apply_to_all = True):
|
||||
registry = ContainerRegistry.getInstance()
|
||||
if registry.isReadOnly(self.getId()):
|
||||
|
|
@ -59,7 +65,7 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
return
|
||||
|
||||
# Get the MaterialGroup
|
||||
material_manager = CuraApplication.getInstance()._material_manager
|
||||
material_manager = CuraApplication.getInstance().getMaterialManager()
|
||||
root_material_id = self.getMetaDataEntry("base_file") #if basefile is self.getId, this is a basefile.
|
||||
material_group = material_manager.getMaterialGroup(root_material_id)
|
||||
|
||||
|
|
@ -606,8 +612,6 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
if not variant_node:
|
||||
continue
|
||||
|
||||
# TODO: check if build plate variant exists
|
||||
|
||||
buildplate_compatibility = machine_compatibility
|
||||
buildplate_recommended = machine_compatibility
|
||||
settings = buildplate.iterfind("./um:setting", self.__namespaces)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue