mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 15:35:54 +08:00
Fix Qt warnings
resolve binding loo in `SyncState` move `updateCostPerMeter` function to root of `MaterialView` such that it is available of all sub components Cura 8687
This commit is contained in:
parent
7b8e73ae34
commit
f957cc289e
@ -82,8 +82,8 @@ Row // Sync state icon + message
|
|||||||
id: stateLabel
|
id: stateLabel
|
||||||
// text is determined by State
|
// text is determined by State
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
width: contentWidth + UM.Theme.getSize("default_margin").height
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
height: contentHeight
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
visible: !Cura.API.account.manualSyncEnabled && !Cura.API.account.updatePackagesEnabled
|
visible: !Cura.API.account.manualSyncEnabled && !Cura.API.account.updatePackagesEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,12 +420,6 @@ Item
|
|||||||
|
|
||||||
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height }
|
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height }
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCostPerMeter()
|
|
||||||
{
|
|
||||||
base.spoolLength = calculateSpoolLength(diameterSpinBox.value, densitySpinBox.value, spoolWeightSpinBox.value);
|
|
||||||
base.costPerMeter = calculateCostPerMeter(spoolCostSpinBox.value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView
|
ListView
|
||||||
@ -518,6 +512,12 @@ Item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateCostPerMeter()
|
||||||
|
{
|
||||||
|
base.spoolLength = calculateSpoolLength(diameterSpinBox.value, densitySpinBox.value, spoolWeightSpinBox.value);
|
||||||
|
base.costPerMeter = calculateCostPerMeter(spoolCostSpinBox.value);
|
||||||
|
}
|
||||||
|
|
||||||
function calculateSpoolLength(diameter, density, spoolWeight)
|
function calculateSpoolLength(diameter, density, spoolWeight)
|
||||||
{
|
{
|
||||||
if(!diameter)
|
if(!diameter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user