mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-23 13:09:28 +08:00
Merge pull request #4164 from Ultimaker/builtiplexer-output-name
Add the active build plate name to default (not user specified) job name
This commit is contained in:
commit
c842d2f89e
@ -267,6 +267,7 @@ class PrintInformation(QObject):
|
||||
new_active_build_plate = self._multi_build_plate_model.activeBuildPlate
|
||||
if new_active_build_plate != self._active_build_plate:
|
||||
self._active_build_plate = new_active_build_plate
|
||||
self._updateJobName()
|
||||
|
||||
self._initVariablesWithBuildPlate(self._active_build_plate)
|
||||
|
||||
@ -320,6 +321,15 @@ class PrintInformation(QObject):
|
||||
else:
|
||||
self._job_name = base_name
|
||||
|
||||
# In case there are several buildplates, a suffix is attached
|
||||
if self._multi_build_plate_model.maxBuildPlate > 0:
|
||||
connector = "_#"
|
||||
suffix = connector + str(self._active_build_plate + 1)
|
||||
if connector in self._job_name:
|
||||
self._job_name = self._job_name.split(connector)[0] # get the real name
|
||||
if self._active_build_plate != 0:
|
||||
self._job_name += suffix
|
||||
|
||||
self.jobNameChanged.emit()
|
||||
|
||||
@pyqtSlot(str)
|
||||
|
Loading…
x
Reference in New Issue
Block a user