Fix for showing printer connect button on component load, use newer CuraApplication as target

This commit is contained in:
ChrisTerBeke 2017-12-08 16:02:22 +01:00
parent baea9eb1e0
commit 2986a17c1d
5 changed files with 39 additions and 26 deletions

View File

@ -24,7 +24,7 @@ UM.MainWindow
// It should be phased out in newer plugin versions.
Connections
{
target: Printer
target: CuraApplication
onShowPrintMonitor: {
if (show) {
UM.Controller.setActiveStage("MonitorStage")
@ -377,7 +377,6 @@ UM.MainWindow
}
width: UM.Theme.getSize("sidebar").width
z: 1
source: UM.Controller.activeStage.sidebarComponent
}
@ -819,7 +818,7 @@ UM.MainWindow
Connections
{
target: Printer
target: CuraApplication
onShowMessageBox:
{
messageDialog.title = title
@ -865,7 +864,7 @@ UM.MainWindow
Connections
{
target: Printer
target: CuraApplication
onRequestAddPrinter:
{
addMachineDialog.visible = true

View File

@ -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
}
}
}

View File

@ -222,14 +222,19 @@ UM.ManagementPage
}
}
Component.onCompleted: {
addAdditionalComponents("machinesDetailPane")
}
Connections {
target: Printer
onAdditionalComponentsChanged:
{
if(areaId == "machinesDetailPane") {
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
}
target: CuraApplication
onAdditionalComponentsChanged: addAdditionalComponents
}
function addAdditionalComponents (areaId) {
if(areaId == "machinesDetailPane") {
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
}
}
}

View File

@ -135,14 +135,19 @@ Item {
spacing: UM.Theme.getSize("default_margin").width
}
Component.onCompleted: {
addAdditionalComponents("saveButton")
}
Connections {
target: Printer
onAdditionalComponentsChanged:
{
if(areaId == "saveButton") {
for (var component in CuraApplication.additionalComponents["saveButton"]) {
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
}
target: CuraApplication
onAdditionalComponentsChanged: addAdditionalComponents
}
function addAdditionalComponents (areaId) {
if(areaId == "saveButton") {
for (var component in CuraApplication.additionalComponents["saveButton"]) {
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
}
}
}

View File

@ -549,7 +549,6 @@ Rectangle
visible: monitoringPrint
}
SidebarTooltip
{
id: tooltip;