mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
CURA-4870 Make the machine selection toolbutton react to changes in the
output devices
This commit is contained in:
parent
fe2a08a46b
commit
16a5b652f4
1 changed files with 13 additions and 2 deletions
|
|
@ -11,9 +11,10 @@ import Cura 1.0 as Cura
|
||||||
import "Menus"
|
import "Menus"
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
property var isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey ? true : false
|
id: base
|
||||||
|
property var isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
|
||||||
property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "unknown"
|
property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "unknown"
|
||||||
text: Cura.MachineManager.activeMachineName
|
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
||||||
|
|
||||||
tooltip: Cura.MachineManager.activeMachineName
|
tooltip: Cura.MachineManager.activeMachineName
|
||||||
|
|
||||||
|
|
@ -73,4 +74,14 @@ ToolButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
menu: PrinterMenu { }
|
menu: PrinterMenu { }
|
||||||
|
|
||||||
|
// Make the toolbutton react when the outputdevice changes
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: Cura.MachineManager
|
||||||
|
onOutputDevicesChanged:
|
||||||
|
{
|
||||||
|
base.isNetworkPrinter = Cura.MachineManager.activeMachineNetworkKey != ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue