mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Comments and removed logs. CURA-3214
This commit is contained in:
parent
600a5d85e4
commit
74ce600978
2 changed files with 4 additions and 3 deletions
|
@ -671,6 +671,7 @@ class CuraApplication(QtApplication):
|
||||||
qmlRegisterType(QUrl.fromLocalFile(path), "Cura", 1, 0, type_name)
|
qmlRegisterType(QUrl.fromLocalFile(path), "Cura", 1, 0, type_name)
|
||||||
|
|
||||||
## Get the backend of the application (the program that does the heavy lifting).
|
## Get the backend of the application (the program that does the heavy lifting).
|
||||||
|
# The backend is also a QObject, which can be used from qml.
|
||||||
# \returns Backend \type{Backend}
|
# \returns Backend \type{Backend}
|
||||||
@pyqtSlot(result = "QObject*")
|
@pyqtSlot(result = "QObject*")
|
||||||
def getBackend(self):
|
def getBackend(self):
|
||||||
|
|
|
@ -36,6 +36,7 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
#
|
#
|
||||||
# This registers all the signal listeners and prepares for communication
|
# This registers all the signal listeners and prepares for communication
|
||||||
# with the back-end in general.
|
# with the back-end in general.
|
||||||
|
# CuraEngineBackend is exposed to qml as well.
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
# Find out where the engine is located, and how it is called.
|
# Find out where the engine is located, and how it is called.
|
||||||
|
@ -190,7 +191,6 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
self._stored_optimized_layer_data = []
|
self._stored_optimized_layer_data = []
|
||||||
|
|
||||||
if self._process is None:
|
if self._process is None:
|
||||||
Logger.log("d", "Creating socket and start the engine...")
|
|
||||||
self._createSocket()
|
self._createSocket()
|
||||||
self.stopSlicing()
|
self.stopSlicing()
|
||||||
self._engine_is_fresh = False # Yes we're going to use the engine
|
self._engine_is_fresh = False # Yes we're going to use the engine
|
||||||
|
@ -203,7 +203,6 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
self.slicingStarted.emit()
|
self.slicingStarted.emit()
|
||||||
|
|
||||||
slice_message = self._socket.createMessage("cura.proto.Slice")
|
slice_message = self._socket.createMessage("cura.proto.Slice")
|
||||||
Logger.log("d", "Really starting slice job")
|
|
||||||
self._start_slice_job = StartSliceJob.StartSliceJob(slice_message)
|
self._start_slice_job = StartSliceJob.StartSliceJob(slice_message)
|
||||||
self._start_slice_job.start()
|
self._start_slice_job.start()
|
||||||
self._start_slice_job.finished.connect(self._onStartSliceCompleted)
|
self._start_slice_job.finished.connect(self._onStartSliceCompleted)
|
||||||
|
@ -569,12 +568,13 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
def _onProcessLayersFinished(self, job):
|
def _onProcessLayersFinished(self, job):
|
||||||
self._process_layers_job = None
|
self._process_layers_job = None
|
||||||
|
|
||||||
|
## Connect slice function to timer.
|
||||||
def enableTimer(self):
|
def enableTimer(self):
|
||||||
if not self._use_timer:
|
if not self._use_timer:
|
||||||
self._change_timer.timeout.connect(self.slice)
|
self._change_timer.timeout.connect(self.slice)
|
||||||
self._use_timer = True
|
self._use_timer = True
|
||||||
|
|
||||||
## Disable timer.
|
## Disconnect slice function from timer.
|
||||||
# This means that slicing will not be triggered automatically
|
# This means that slicing will not be triggered automatically
|
||||||
def disableTimer(self):
|
def disableTimer(self):
|
||||||
if self._use_timer:
|
if self._use_timer:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue