mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 14:45:55 +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
|
id: base
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property var selectedPrinter: null
|
property var selectedPrinter: null
|
||||||
|
property var connectingWithPrinter: null
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
@ -23,8 +24,13 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
if(base.selectedPrinter)
|
if(base.selectedPrinter)
|
||||||
{
|
{
|
||||||
manager.setKey(base.selectedPrinter.getKey())
|
var printerKey = base.selectedPrinter.getKey()
|
||||||
completed()
|
if(connectingWithPrinter != printerKey) {
|
||||||
|
// prevent an infinite loop
|
||||||
|
connectingWithPrinter = printerKey;
|
||||||
|
manager.setKey(printerKey);
|
||||||
|
completed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user