mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Fix for showing printer connect button on component load, use newer CuraApplication as target
This commit is contained in:
parent
baea9eb1e0
commit
2986a17c1d
5 changed files with 39 additions and 26 deletions
|
@ -198,14 +198,19 @@ Item
|
|||
spacing: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
updateAdditionalComponents("monitorButtons")
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Printer
|
||||
onAdditionalComponentsChanged:
|
||||
{
|
||||
if(areaId == "monitorButtons") {
|
||||
for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
|
||||
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
|
||||
}
|
||||
target: CuraApplication
|
||||
onAdditionalComponentsChanged: updateAdditionalComponents
|
||||
}
|
||||
|
||||
function updateAdditionalComponents (areaId) {
|
||||
if(areaId == "monitorButtons") {
|
||||
for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
|
||||
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue