mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Prevent infinite loop when adding a Jedi printer
CURA-2019
This commit is contained in:
parent
c9daaf1521
commit
d7f3b73420
1 changed files with 8 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue