Browse Source

Fix decimals on heated bed temperature monitor (HeatedBedBox.qml)

Round heated bed temperature values when printer sends them with decimal digits. 
Same roundings already exist on the extruder temperatures (see ExtruderBox.qml line 50 and 85)
Asteroids 2 years ago
parent
commit
17c020b3cd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      resources/qml/PrinterOutput/HeatedBedBox.qml

+ 3 - 3
resources/qml/PrinterOutput/HeatedBedBox.qml

@@ -32,7 +32,7 @@ Item
         UM.Label
         UM.Label
         {
         {
             id: bedTargetTemperature
             id: bedTargetTemperature
-            text: printerModel != null ? printerModel.targetBedTemperature + "°C" : ""
+            text: printerModel != null ? Math.round(printerModel.targetBedTemperature) + "°C" : ""
             font: UM.Theme.getFont("default_bold")
             font: UM.Theme.getFont("default_bold")
             color: UM.Theme.getColor("text_inactive")
             color: UM.Theme.getColor("text_inactive")
             anchors.right: parent.right
             anchors.right: parent.right
@@ -66,7 +66,7 @@ Item
         UM.Label
         UM.Label
         {
         {
             id: bedCurrentTemperature
             id: bedCurrentTemperature
-            text: printerModel != null ? printerModel.bedTemperature + "°C" : ""
+            text: printerModel != null ? Math.round(printerModel.bedTemperature) + "°C" : ""
             font: UM.Theme.getFont("large_bold")
             font: UM.Theme.getFont("large_bold")
             anchors.right: bedTargetTemperature.left
             anchors.right: bedTargetTemperature.left
             anchors.top: parent.top
             anchors.top: parent.top
@@ -293,4 +293,4 @@ Item
             }
             }
         }
         }
     }
     }
-}
+}