CURA-5280 Preserve manually entered project name

Manual override of job name should also set the base name so that when the printer prefix is updated, it the prefix can be added to the manually added name, not the old base name.

This was a bit tricky because if you enter a job name, is that the job name or the base name? My answer is that it's both, and if you update your printer for the job, it will append a new prefix.

If this is not the desired behavior, and in fact once a custom name is set nothing can change it, then line 78 should be removed.
This commit is contained in:
Ian Paschal 2018-05-23 16:28:35 +02:00
parent de455a9a64
commit d14f4ac678

View file

@ -279,9 +279,11 @@ class PrintInformation(QObject):
for build_plate_number in range(self._multi_build_plate_model.maxBuildPlate + 1):
self._calculateInformation(build_plate_number)
# prefix can be added to the manually added name, not the old base name
@pyqtSlot(str)
def setJobName(self, name):
self._job_name = name
self._base_name = name
self.jobNameChanged.emit()
jobNameChanged = pyqtSignal()