mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CHeckup action now correctly resets every time you start it
CURA-1385
This commit is contained in:
parent
aba0392728
commit
59020fd98c
2 changed files with 12 additions and 5 deletions
|
@ -43,7 +43,6 @@ class UMOCheckupMachineAction(MachineAction):
|
||||||
if self._output_device is None and self._check_started:
|
if self._output_device is None and self._check_started:
|
||||||
self.startCheck()
|
self.startCheck()
|
||||||
|
|
||||||
|
|
||||||
def _getPrinterOutputDevices(self):
|
def _getPrinterOutputDevices(self):
|
||||||
return [printer_output_device for printer_output_device in
|
return [printer_output_device for printer_output_device in
|
||||||
Application.getInstance().getOutputDeviceManager().getOutputDevices() if
|
Application.getInstance().getOutputDeviceManager().getOutputDevices() if
|
||||||
|
@ -63,6 +62,7 @@ class UMOCheckupMachineAction(MachineAction):
|
||||||
self._output_device = None
|
self._output_device = None
|
||||||
|
|
||||||
self._check_started = False
|
self._check_started = False
|
||||||
|
self.checkStartedChanged.emit()
|
||||||
|
|
||||||
# Ensure everything is reset (and right signals are emitted again)
|
# Ensure everything is reset (and right signals are emitted again)
|
||||||
self._bed_test_completed = False
|
self._bed_test_completed = False
|
||||||
|
@ -79,6 +79,7 @@ class UMOCheckupMachineAction(MachineAction):
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = onBedTestCompleted)
|
@pyqtProperty(bool, notify = onBedTestCompleted)
|
||||||
def bedTestCompleted(self):
|
def bedTestCompleted(self):
|
||||||
|
print("zomg?")
|
||||||
return self._bed_test_completed
|
return self._bed_test_completed
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = onHotendTestCompleted)
|
@pyqtProperty(bool, notify = onHotendTestCompleted)
|
||||||
|
@ -137,9 +138,16 @@ class UMOCheckupMachineAction(MachineAction):
|
||||||
self._z_min_endstop_test_completed = True
|
self._z_min_endstop_test_completed = True
|
||||||
self.onZMinEndstopTestCompleted.emit()
|
self.onZMinEndstopTestCompleted.emit()
|
||||||
|
|
||||||
|
checkStartedChanged = pyqtSignal()
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify = checkStartedChanged)
|
||||||
|
def checkStarted(self):
|
||||||
|
return self._check_started
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def startCheck(self):
|
def startCheck(self):
|
||||||
self._check_started = True
|
self._check_started = True
|
||||||
|
self.checkStartedChanged.emit()
|
||||||
output_devices = self._getPrinterOutputDevices()
|
output_devices = self._getPrinterOutputDevices()
|
||||||
if output_devices:
|
if output_devices:
|
||||||
self._output_device = output_devices[0]
|
self._output_device = output_devices[0]
|
||||||
|
|
|
@ -32,7 +32,7 @@ Cura.MachineAction
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
wrapMode: Text.WordWrap
|
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
|
Item
|
||||||
|
@ -51,7 +51,7 @@ Cura.MachineAction
|
||||||
text: catalog.i18nc("@action:button","Start Printer Check");
|
text: catalog.i18nc("@action:button","Start Printer Check");
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
checkupContent.visible = true
|
//checkupContent.visible = true
|
||||||
manager.startCheck()
|
manager.startCheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ Cura.MachineAction
|
||||||
id: checkupContent
|
id: checkupContent
|
||||||
anchors.top: startStopButtons.bottom
|
anchors.top: startStopButtons.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
visible: false
|
visible: manager.checkStarted
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 250
|
height: 250
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
|
@ -188,7 +188,6 @@ Cura.MachineAction
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
manager.heatupHotend()
|
manager.heatupHotend()
|
||||||
nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue