CHeckup action now correctly resets every time you start it

CURA-1385
This commit is contained in:
Jaime van Kessel 2016-07-06 11:20:06 +02:00
parent aba0392728
commit 59020fd98c
2 changed files with 12 additions and 5 deletions

View file

@ -43,7 +43,6 @@ class UMOCheckupMachineAction(MachineAction):
if self._output_device is None and self._check_started:
self.startCheck()
def _getPrinterOutputDevices(self):
return [printer_output_device for printer_output_device in
Application.getInstance().getOutputDeviceManager().getOutputDevices() if
@ -63,6 +62,7 @@ class UMOCheckupMachineAction(MachineAction):
self._output_device = None
self._check_started = False
self.checkStartedChanged.emit()
# Ensure everything is reset (and right signals are emitted again)
self._bed_test_completed = False
@ -79,6 +79,7 @@ class UMOCheckupMachineAction(MachineAction):
@pyqtProperty(bool, notify = onBedTestCompleted)
def bedTestCompleted(self):
print("zomg?")
return self._bed_test_completed
@pyqtProperty(bool, notify = onHotendTestCompleted)
@ -137,9 +138,16 @@ class UMOCheckupMachineAction(MachineAction):
self._z_min_endstop_test_completed = True
self.onZMinEndstopTestCompleted.emit()
checkStartedChanged = pyqtSignal()
@pyqtProperty(bool, notify = checkStartedChanged)
def checkStarted(self):
return self._check_started
@pyqtSlot()
def startCheck(self):
self._check_started = True
self.checkStartedChanged.emit()
output_devices = self._getPrinterOutputDevices()
if output_devices:
self._output_device = output_devices[0]

View file

@ -32,7 +32,7 @@ Cura.MachineAction
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional");
text: catalog.i18nc("@label", "It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional");
}
Item
@ -51,7 +51,7 @@ Cura.MachineAction
text: catalog.i18nc("@action:button","Start Printer Check");
onClicked:
{
checkupContent.visible = true
//checkupContent.visible = true
manager.startCheck()
}
}
@ -73,7 +73,7 @@ Cura.MachineAction
id: checkupContent
anchors.top: startStopButtons.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
visible: false
visible: manager.checkStarted
width: parent.width
height: 250
//////////////////////////////////////////////////////////
@ -188,7 +188,6 @@ Cura.MachineAction
onClicked:
{
manager.heatupHotend()
nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking")
}
}
}