mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:06:00 +08:00
Prevent infinite loop when adding a Jedi printer
CURA-2019
This commit is contained in:
parent
c9daaf1521
commit
d7f3b73420
@ -11,6 +11,7 @@ Cura.MachineAction
|
||||
id: base
|
||||
anchors.fill: parent;
|
||||
property var selectedPrinter: null
|
||||
property var connectingWithPrinter: null
|
||||
|
||||
Connections
|
||||
{
|
||||
@ -23,8 +24,13 @@ Cura.MachineAction
|
||||
{
|
||||
if(base.selectedPrinter)
|
||||
{
|
||||
manager.setKey(base.selectedPrinter.getKey())
|
||||
completed()
|
||||
var printerKey = base.selectedPrinter.getKey()
|
||||
if(connectingWithPrinter != printerKey) {
|
||||
// prevent an infinite loop
|
||||
connectingWithPrinter = printerKey;
|
||||
manager.setKey(printerKey);
|
||||
completed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user