mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Fix 'Could not get metadata of container <empty string>'
Turns out that the side bar header was requesting the metadata before the active material was set. Now I'm just saying that if the active material was not set, it should not be compatible. Contributes to issue CURA-4243, side-ways.
This commit is contained in:
parent
8bbb6c1af5
commit
839c8ccc52
3 changed files with 6 additions and 2 deletions
|
@ -151,7 +151,7 @@ class MachineManager(QObject):
|
||||||
if not self._global_container_stack:
|
if not self._global_container_stack:
|
||||||
return
|
return
|
||||||
|
|
||||||
containers = ContainerRegistry.getInstance().findInstanceContainersMetadata(type="variant", definition=self._global_container_stack.getBottom().getId(), name=hotend_id)
|
containers = ContainerRegistry.getInstance().findInstanceContainersMetadata(type = "variant", definition = self._global_container_stack.getBottom().getId(), name = hotend_id)
|
||||||
if containers: # New material ID is known
|
if containers: # New material ID is known
|
||||||
extruder_manager = ExtruderManager.getInstance()
|
extruder_manager = ExtruderManager.getInstance()
|
||||||
machine_id = self.activeMachineId
|
machine_id = self.activeMachineId
|
||||||
|
|
|
@ -41,7 +41,7 @@ TabView
|
||||||
|
|
||||||
Tab
|
Tab
|
||||||
{
|
{
|
||||||
title: catalog.i18nc("@title","Information")
|
title: catalog.i18nc("@title", "Information")
|
||||||
|
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
|
|
@ -252,6 +252,10 @@ Column
|
||||||
visible: Cura.MachineManager.hasMaterials
|
visible: Cura.MachineManager.hasMaterials
|
||||||
property var valueError:
|
property var valueError:
|
||||||
{
|
{
|
||||||
|
if(Cura.MachineManager.activeMaterialId === "")
|
||||||
|
{
|
||||||
|
return false
|
||||||
|
}
|
||||||
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
||||||
if(data == "False")
|
if(data == "False")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue