Fix merge conflicts

This commit is contained in:
Lipu Fei 2019-03-22 10:25:07 +01:00
commit 77720c9039
4 changed files with 11 additions and 13 deletions

View File

@ -73,10 +73,9 @@ Item
Component.onCompleted: Component.onCompleted:
{ {
// select the first one that's not "unknown" by default. // Select the first one that's not "unknown" by default.
for (var i = 0; i < count; i++) for (var i = 0; i < count; i++)
{ {
if (!model[i].is_unknown_machine_type) if (!model[i].is_unknown_machine_type)
{ {
currentIndex = i currentIndex = i

View File

@ -18,7 +18,9 @@ Item
id: addPrinterByIpScreen id: addPrinterByIpScreen
// Whether an IP address is currently being resolved.
property bool hasSentRequest: false property bool hasSentRequest: false
// Whether the IP address user entered can be resolved as a recognizable printer.
property bool haveConnection: false property bool haveConnection: false
Label Label
@ -116,7 +118,7 @@ Item
} }
} }
Rectangle Item
{ {
width: parent.width width: parent.width
anchors.top: userInputFields.bottom anchors.top: userInputFields.bottom
@ -133,7 +135,7 @@ Item
text: catalog.i18nc("@label", "The printer at this address has not responded yet.") text: catalog.i18nc("@label", "The printer at this address has not responded yet.")
} }
Rectangle Item
{ {
id: printerInfoLabels id: printerInfoLabels
anchors.top: parent.top anchors.top: parent.top
@ -202,9 +204,7 @@ Item
text: catalog.i18nc("@button", "Cancel") text: catalog.i18nc("@button", "Cancel")
width: UM.Theme.getSize("action_button").width width: UM.Theme.getSize("action_button").width
fixedWidthMode: true fixedWidthMode: true
onClicked: base.gotoPage("add_printer_by_selection") onClicked: base.goToPage("add_printer_by_selection")
enabled: true
} }
Cura.PrimaryButton Cura.PrimaryButton

View File

@ -67,7 +67,7 @@ Item
onAddByIpButtonClicked: onAddByIpButtonClicked:
{ {
base.gotoPage("add_printer_by_ip") base.goToPage("add_printer_by_ip")
} }
} }
} }
@ -139,7 +139,7 @@ Item
CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinter(networkPrinterItem) CuraApplication.getDiscoveredPrintersModel().createMachineFromDiscoveredPrinter(networkPrinterItem)
// If we have created a machine, go to the last page, which is the "cloud" page. // If we have created a machine, go to the last page, which is the "cloud" page.
base.gotoPage("cloud") base.goToPage("cloud")
} }
else else
{ {
@ -147,7 +147,7 @@ Item
const localPrinterItem = addLocalPrinterDropDown.contentItem.currentItem const localPrinterItem = addLocalPrinterDropDown.contentItem.currentItem
Cura.MachineManager.addMachine(localPrinterItem.id) Cura.MachineManager.addMachine(localPrinterItem.id)
base.gotoPage("machine_actions") base.goToPage("machine_actions")
} }
} }
} }

View File

@ -31,7 +31,7 @@ Item
signal showNextPage() signal showNextPage()
signal showPreviousPage() signal showPreviousPage()
signal passLastPage() // Emitted when there is no more page to show signal passLastPage() // Emitted when there is no more page to show
signal gotoPage(string page_id) // Go to a specific page by the given page_id. signal goToPage(string page_id) // Go to a specific page by the given page_id.
onShowNextPage: onShowNextPage:
{ {
@ -52,7 +52,7 @@ Item
} }
} }
onGotoPage: onGoToPage:
{ {
// find the page index // find the page index
var page_index = -1 var page_index = -1
@ -108,7 +108,6 @@ Item
source: parent source: parent
horizontalOffset: base.shadowOffset horizontalOffset: base.shadowOffset
verticalOffset: base.shadowOffset verticalOffset: base.shadowOffset
visible: true
color: UM.Theme.getColor("monitor_shadow") color: UM.Theme.getColor("monitor_shadow")
transparentBorder: true transparentBorder: true
// Should always be drawn behind the background. // Should always be drawn behind the background.