mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 23:29:01 +08:00
Don't keep a copy of currently connected printer
This QML file was holding a copy of the currently connected printer, stored in connectingToPrinter. This copy got out of sync when you load a project file which had a different connected printer. Instead, ask the manager for the currently connected printer key every time you click the button. Contributes to issue CURA-3839.
This commit is contained in:
parent
5a6049ddea
commit
bd361e500c
@ -12,7 +12,6 @@ Cura.MachineAction
|
|||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property var selectedPrinter: null
|
property var selectedPrinter: null
|
||||||
property bool completeProperties: true
|
property bool completeProperties: true
|
||||||
property var connectingToPrinter: null
|
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
@ -33,9 +32,8 @@ Cura.MachineAction
|
|||||||
if(base.selectedPrinter && base.completeProperties)
|
if(base.selectedPrinter && base.completeProperties)
|
||||||
{
|
{
|
||||||
var printerKey = base.selectedPrinter.getKey()
|
var printerKey = base.selectedPrinter.getKey()
|
||||||
if(connectingToPrinter != printerKey) {
|
if(manager.getStoredKey() != printerKey)
|
||||||
// prevent an infinite loop
|
{
|
||||||
connectingToPrinter = printerKey;
|
|
||||||
manager.setKey(printerKey);
|
manager.setKey(printerKey);
|
||||||
completed();
|
completed();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user