mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:09:00 +08:00
CURA-4870 Don't show the configuration selector if the printer is not a
network printer (for example don't show if is USB)
This commit is contained in:
parent
c69987b824
commit
23a2b6e0f7
@ -12,7 +12,7 @@ import "Menus"
|
|||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: base
|
id: base
|
||||||
property var isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
|
property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
|
||||||
property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "disconnected"
|
property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "disconnected"
|
||||||
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
||||||
|
|
||||||
|
@ -17,11 +17,15 @@ Button
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
function updateOnSync() {
|
function updateOnSync()
|
||||||
if (outputDevice != undefined) {
|
{
|
||||||
for (var index in outputDevice.uniqueConfigurations) {
|
if (outputDevice != undefined)
|
||||||
|
{
|
||||||
|
for (var index in outputDevice.uniqueConfigurations)
|
||||||
|
{
|
||||||
var configuration = outputDevice.uniqueConfigurations[index]
|
var configuration = outputDevice.uniqueConfigurations[index]
|
||||||
if (Cura.MachineManager.matchesConfiguration(configuration)) {
|
if (Cura.MachineManager.matchesConfiguration(configuration))
|
||||||
|
{
|
||||||
base.matched = true;
|
base.matched = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ Rectangle
|
|||||||
property bool hideView: Cura.MachineManager.activeMachineName == ""
|
property bool hideView: Cura.MachineManager.activeMachineName == ""
|
||||||
|
|
||||||
// Is there an output device for this printer?
|
// Is there an output device for this printer?
|
||||||
|
property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||||
@ -106,7 +107,7 @@ Rectangle
|
|||||||
|
|
||||||
ConfigurationSelection {
|
ConfigurationSelection {
|
||||||
id: configSelection
|
id: configSelection
|
||||||
visible: printerConnected && !sidebar.monitoringPrint && !sidebar.hideSettings
|
visible: isNetworkPrinter && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
width: visible ? Math.round(base.width * 0.15) : 0
|
width: visible ? Math.round(base.width * 0.15) : 0
|
||||||
height: UM.Theme.getSize("sidebar_header").height
|
height: UM.Theme.getSize("sidebar_header").height
|
||||||
anchors.top: base.top
|
anchors.top: base.top
|
||||||
|
Loading…
x
Reference in New Issue
Block a user