mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:55:58 +08:00
Codestyle & Documentation
This commit is contained in:
parent
021bb97fc4
commit
0de4f466dc
@ -295,7 +295,9 @@ class CuraApplication(QtApplication):
|
||||
|
||||
@pyqtSlot(str)
|
||||
def setJobName(self, name):
|
||||
name = os.path.splitext(name)[0] #when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its extension. This cuts the extension off if nescessary.
|
||||
# when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its
|
||||
# extension. This cuts the extension off if necessary.
|
||||
name = os.path.splitext(name)[0]
|
||||
if self._job_name != name:
|
||||
self._job_name = name
|
||||
self.jobNameChanged.emit()
|
||||
@ -384,7 +386,7 @@ class CuraApplication(QtApplication):
|
||||
op = SetTransformOperation(node, Vector())
|
||||
op.push()
|
||||
|
||||
## Delete all mesh data on the scene.
|
||||
## Delete all nodes containing mesh data in the scene.
|
||||
@pyqtSlot()
|
||||
def deleteAll(self):
|
||||
if not self.getController().getToolsEnabled():
|
||||
@ -513,7 +515,6 @@ class CuraApplication(QtApplication):
|
||||
if not self.getMachineManager().getWorkingProfile():
|
||||
return None
|
||||
return self.getMachineManager().getWorkingProfile().getSettingValue(key)
|
||||
#return self.getActiveMachine().getSettingValueByKey(key)
|
||||
|
||||
## Change setting by key value pair
|
||||
@pyqtSlot(str, "QVariant")
|
||||
@ -561,7 +562,7 @@ class CuraApplication(QtApplication):
|
||||
op.addOperation(SetParentOperation(node, group_node))
|
||||
op.push()
|
||||
|
||||
# Deselect individual nodes and select the groupnode instead
|
||||
# Deselect individual nodes and select the group-node instead
|
||||
for node in group_node.getChildren():
|
||||
Selection.remove(node)
|
||||
Selection.add(group_node)
|
||||
@ -584,7 +585,8 @@ class CuraApplication(QtApplication):
|
||||
child.callDecoration("setConvexHull", None)
|
||||
|
||||
op.push()
|
||||
# Note: The group removes itself from the scene once all its children have left it, see GroupDecorator._onChildrenChanged
|
||||
# Note: The group removes itself from the scene once all its children have left it,
|
||||
# see GroupDecorator._onChildrenChanged
|
||||
|
||||
def _createSplashScreen(self):
|
||||
return CuraSplashScreen.CuraSplashScreen()
|
||||
@ -625,9 +627,6 @@ class CuraApplication(QtApplication):
|
||||
def _reloadMeshFinished(self, job):
|
||||
# TODO; This needs to be fixed properly. We now make the assumption that we only load a single mesh!
|
||||
job._node.setMeshData(job.getResult().getMeshData())
|
||||
#job.getResult().setParent(self.getController().getScene().getRoot())
|
||||
#job._node.setParent(self.getController().getScene().getRoot())
|
||||
#job._node.meshDataChanged.emit(job._node)
|
||||
|
||||
def _openFile(self, file):
|
||||
job = ReadMeshJob(os.path.abspath(file))
|
||||
|
Loading…
x
Reference in New Issue
Block a user