Browse Source

Small fixes (mostly QML warnings and the like).

done as part of CURA-9422
Remco Burema 2 years ago
parent
commit
afeec473f6

+ 0 - 1
cura/Settings/GlobalStack.py

@@ -90,7 +90,6 @@ class GlobalStack(CuraContainerStack):
     @pyqtProperty("QVariantList", notify=configuredConnectionTypesChanged)
     def configuredConnectionTypes(self) -> List[int]:
         """The configured connection types can be used to find out if the global
-
         stack is configured to be connected with a printer, without having to
         know all the details as to how this is exactly done (and without
         actually setting the stack to be active).

+ 2 - 2
plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml

@@ -153,7 +153,7 @@ Item
 
                     MonitorPrinterPill
                     {
-                        text: printJob.configuration.printerType
+                        text: printJob ? printJob.configuration.printerType : ""
                     }
                 }
             }
@@ -173,7 +173,7 @@ Item
                 id: printerConfiguration
                 anchors.verticalCenter: parent.verticalCenter
                 buildplate: catalog.i18nc("@label", "Glass")
-                configurations: base.printJob.configuration.extruderConfigurations
+                configurations: base.printJob ? base.printJob.configuration.extruderConfigurations : null
                 height: Math.round(72 * screenScaleFactor) // TODO: Theme!
             }
 

+ 2 - 2
resources/qml/PrinterSelector/MachineListButton.qml

@@ -68,11 +68,11 @@ Button
                 top: buttonText.top
                 bottom: buttonText.bottom
             }
-            visible: model.isAbstractMachine
+            visible: model.isAbstractMachine ? model.isAbstractMachine : false
 
             UM.Label
             {
-                text: model.machineCount
+                text: model.machineCount ? model.machineCount : ""
                 anchors.centerIn: parent
                 font: UM.Theme.getFont("default_bold")
             }

+ 0 - 1
resources/qml/PrinterSelector/MachineSelector.qml

@@ -223,7 +223,6 @@ Cura.ExpandablePopup
             id: buttonRow
 
             anchors.bottom: parent.bottom
-            anchors.horizontalCenter: parent.horizontalCenter
             anchors.left: parent.left
             anchors.right: parent.right