mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06: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
1 changed files with 2 additions and 4 deletions
|
@ -12,7 +12,6 @@ Cura.MachineAction
|
|||
anchors.fill: parent;
|
||||
property var selectedPrinter: null
|
||||
property bool completeProperties: true
|
||||
property var connectingToPrinter: null
|
||||
|
||||
Connections
|
||||
{
|
||||
|
@ -33,9 +32,8 @@ Cura.MachineAction
|
|||
if(base.selectedPrinter && base.completeProperties)
|
||||
{
|
||||
var printerKey = base.selectedPrinter.getKey()
|
||||
if(connectingToPrinter != printerKey) {
|
||||
// prevent an infinite loop
|
||||
connectingToPrinter = printerKey;
|
||||
if(manager.getStoredKey() != printerKey)
|
||||
{
|
||||
manager.setKey(printerKey);
|
||||
completed();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue