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.