Use optional last output (file) name from output-dev to set project name.

Instead of relying on the filename emitted when the workspace is changed. This is done so the user can also change the project name when saving to an output device, such as a local file, or the digital library, that supports changeing the (file)name.

CURA-8358
This commit is contained in:
Remco Burema 2021-09-01 16:04:05 +02:00
parent 6ad358a55d
commit c2c53d51c1
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
3 changed files with 17 additions and 7 deletions

View file

@ -603,8 +603,8 @@ class DigitalFactoryController(QObject):
self._saveFileToSelectedProjectHelper(filename, formats)
def _saveFileToSelectedProjectHelper(self, filename: str, formats: List[str]) -> None:
# Indicate we have started sending a job.
self.uploadStarted.emit()
# Indicate we have started sending a job (and propagate any user file name changes back to the open project)
self.uploadStarted.emit(filename)
library_project_id = self._project_model.items[self._selected_project_idx]["libraryProjectId"]
library_project_name = self._project_model.items[self._selected_project_idx]["displayName"]