mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Revert "Revert "Set the job name whenever the workspaceLoaded is called""
This reverts commit a6a69c249c
.
This commit is contained in:
parent
395aa58a3f
commit
98eba28885
1 changed files with 5 additions and 1 deletions
|
@ -67,7 +67,7 @@ class PrintInformation(QObject):
|
||||||
self._application.globalContainerStackChanged.connect(self._updateJobName)
|
self._application.globalContainerStackChanged.connect(self._updateJobName)
|
||||||
self._application.globalContainerStackChanged.connect(self.setToZeroPrintInformation)
|
self._application.globalContainerStackChanged.connect(self.setToZeroPrintInformation)
|
||||||
self._application.fileLoaded.connect(self.setBaseName)
|
self._application.fileLoaded.connect(self.setBaseName)
|
||||||
self._application.workspaceLoaded.connect(self.setProjectName)
|
self._application.workspaceLoaded.connect(self._onWorkspaceLoaded)
|
||||||
self._application.getMachineManager().rootMaterialChanged.connect(self._onActiveMaterialsChanged)
|
self._application.getMachineManager().rootMaterialChanged.connect(self._onActiveMaterialsChanged)
|
||||||
self._application.getInstance().getPreferences().preferenceChanged.connect(self._onPreferencesChanged)
|
self._application.getInstance().getPreferences().preferenceChanged.connect(self._onPreferencesChanged)
|
||||||
|
|
||||||
|
@ -439,3 +439,7 @@ class PrintInformation(QObject):
|
||||||
"""Listen to scene changes to check if we need to reset the print information"""
|
"""Listen to scene changes to check if we need to reset the print information"""
|
||||||
|
|
||||||
self.setToZeroPrintInformation(self._active_build_plate)
|
self.setToZeroPrintInformation(self._active_build_plate)
|
||||||
|
|
||||||
|
def _onWorkspaceLoaded(self, new_name: str) -> None:
|
||||||
|
"""Update the job name whenever a new workspace is loaded."""
|
||||||
|
self.setJobName(os.path.splitext(os.path.basename(new_name))[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue