mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:59:02 +08:00
Fix for showing printer connect button on component load, use newer CuraApplication as target
This commit is contained in:
parent
baea9eb1e0
commit
2986a17c1d
@ -24,7 +24,7 @@ UM.MainWindow
|
|||||||
// It should be phased out in newer plugin versions.
|
// It should be phased out in newer plugin versions.
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onShowPrintMonitor: {
|
onShowPrintMonitor: {
|
||||||
if (show) {
|
if (show) {
|
||||||
UM.Controller.setActiveStage("MonitorStage")
|
UM.Controller.setActiveStage("MonitorStage")
|
||||||
@ -377,7 +377,6 @@ UM.MainWindow
|
|||||||
}
|
}
|
||||||
|
|
||||||
width: UM.Theme.getSize("sidebar").width
|
width: UM.Theme.getSize("sidebar").width
|
||||||
z: 1
|
|
||||||
|
|
||||||
source: UM.Controller.activeStage.sidebarComponent
|
source: UM.Controller.activeStage.sidebarComponent
|
||||||
}
|
}
|
||||||
@ -819,7 +818,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onShowMessageBox:
|
onShowMessageBox:
|
||||||
{
|
{
|
||||||
messageDialog.title = title
|
messageDialog.title = title
|
||||||
@ -865,7 +864,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onRequestAddPrinter:
|
onRequestAddPrinter:
|
||||||
{
|
{
|
||||||
addMachineDialog.visible = true
|
addMachineDialog.visible = true
|
||||||
|
@ -198,17 +198,22 @@ Item
|
|||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
updateAdditionalComponents("monitorButtons")
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onAdditionalComponentsChanged:
|
onAdditionalComponentsChanged: updateAdditionalComponents
|
||||||
{
|
}
|
||||||
|
|
||||||
|
function updateAdditionalComponents (areaId) {
|
||||||
if(areaId == "monitorButtons") {
|
if(areaId == "monitorButtons") {
|
||||||
for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
|
for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
|
||||||
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
|
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
@ -222,17 +222,22 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
addAdditionalComponents("machinesDetailPane")
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onAdditionalComponentsChanged:
|
onAdditionalComponentsChanged: addAdditionalComponents
|
||||||
{
|
}
|
||||||
|
|
||||||
|
function addAdditionalComponents (areaId) {
|
||||||
if(areaId == "machinesDetailPane") {
|
if(areaId == "machinesDetailPane") {
|
||||||
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
|
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
|
||||||
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
UM.I18nCatalog { id: catalog; name: "cura"; }
|
||||||
|
|
||||||
|
@ -135,17 +135,22 @@ Item {
|
|||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
addAdditionalComponents("saveButton")
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Printer
|
target: CuraApplication
|
||||||
onAdditionalComponentsChanged:
|
onAdditionalComponentsChanged: addAdditionalComponents
|
||||||
{
|
}
|
||||||
|
|
||||||
|
function addAdditionalComponents (areaId) {
|
||||||
if(areaId == "saveButton") {
|
if(areaId == "saveButton") {
|
||||||
for (var component in CuraApplication.additionalComponents["saveButton"]) {
|
for (var component in CuraApplication.additionalComponents["saveButton"]) {
|
||||||
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: UM.Preferences
|
target: UM.Preferences
|
||||||
|
@ -549,7 +549,6 @@ Rectangle
|
|||||||
visible: monitoringPrint
|
visible: monitoringPrint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SidebarTooltip
|
SidebarTooltip
|
||||||
{
|
{
|
||||||
id: tooltip;
|
id: tooltip;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user