mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
CURA-4870 Match the printer type in the dropdown with one of the
available printer types in the group
This commit is contained in:
parent
be8fc9f3f1
commit
3629c3959e
5 changed files with 72 additions and 49 deletions
|
@ -57,7 +57,7 @@ Column
|
|||
section.criteria: ViewSection.FullString
|
||||
section.delegate: sectionHeading
|
||||
|
||||
model: outputDevice.uniqueConfigurations
|
||||
model: (ouputDevice != null) ? outputDevice.uniqueConfigurations : []
|
||||
delegate: ConfigurationItem
|
||||
{
|
||||
width: parent.width - UM.Theme.getSize("default_margin").width
|
||||
|
|
|
@ -18,13 +18,16 @@ Button
|
|||
|
||||
function updateOnSync()
|
||||
{
|
||||
for (var index in outputDevice.uniqueConfigurations)
|
||||
if (outputDevice != undefined)
|
||||
{
|
||||
var configuration = outputDevice.uniqueConfigurations[index]
|
||||
if (Cura.MachineManager.matchesConfiguration(configuration))
|
||||
for (var index in outputDevice.uniqueConfigurations)
|
||||
{
|
||||
base.text = catalog.i18nc("@label:sync indicator", "Matched")
|
||||
return
|
||||
var configuration = outputDevice.uniqueConfigurations[index]
|
||||
if (Cura.MachineManager.matchesConfiguration(configuration))
|
||||
{
|
||||
base.text = catalog.i18nc("@label:sync indicator", "Matched")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
base.text = catalog.i18nc("@label:sync indicator", "No match")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.3 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -16,12 +16,12 @@ Menu
|
|||
Instantiator
|
||||
{
|
||||
id: printerTypeInstantiator
|
||||
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : null
|
||||
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : []
|
||||
|
||||
MenuItem {
|
||||
text: modelData.machine_type
|
||||
checkable: true
|
||||
checked: false
|
||||
checked: Cura.MachineManager.activeMachineDefinitionName == modelData.machine_type
|
||||
exclusiveGroup: group
|
||||
// onTriggered:
|
||||
// {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue