mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
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:
parent
6ad358a55d
commit
c2c53d51c1
3 changed files with 17 additions and 7 deletions
|
@ -105,8 +105,10 @@ class DigitalFactoryOutputDevice(ProjectOutputDevice):
|
|||
self.enabled = logged_in and self._controller.userAccountHasLibraryAccess()
|
||||
self.enabledChanged.emit()
|
||||
|
||||
def _onWriteStarted(self) -> None:
|
||||
def _onWriteStarted(self, new_name: Optional[str] = None) -> None:
|
||||
self._writing = True
|
||||
if new_name:
|
||||
self.setLastOutputName(new_name) # On saving, the user can change the name, this should propagate.
|
||||
self.writeStarted.emit(self)
|
||||
|
||||
def _onWriteFinished(self) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue