mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-24 11:21:14 -07:00
Merge branch 'master' into feature_headless_docker
This commit is contained in:
commit
422d047317
37 changed files with 570 additions and 148 deletions
|
|
@ -300,6 +300,7 @@ class CuraApplication(QtApplication):
|
|||
empty_quality_changes_container = copy.deepcopy(empty_container)
|
||||
empty_quality_changes_container.setMetaDataEntry("id", "empty_quality_changes")
|
||||
empty_quality_changes_container.addMetaDataEntry("type", "quality_changes")
|
||||
empty_quality_changes_container.addMetaDataEntry("quality_type", "not_supported")
|
||||
ContainerRegistry.getInstance().addContainer(empty_quality_changes_container)
|
||||
|
||||
with ContainerRegistry.getInstance().lockFile():
|
||||
|
|
@ -1082,9 +1083,10 @@ class CuraApplication(QtApplication):
|
|||
op.push()
|
||||
Selection.clear()
|
||||
|
||||
Logger.log("i", "Reseting print information")
|
||||
self._print_information = PrintInformation.PrintInformation()
|
||||
|
||||
# Reset the print information:
|
||||
self.getController().getScene().sceneChanged.emit(node)
|
||||
# self._print_information.setToZeroPrintInformation(self.getBuildPlateModel().activeBuildPlate)
|
||||
|
||||
# stay on the same build plate
|
||||
#self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate
|
||||
|
||||
|
|
@ -1484,11 +1486,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
extension = os.path.splitext(filename)[1]
|
||||
if extension.lower() in self._non_sliceable_extensions:
|
||||
self.getController().setActiveView("SimulationView")
|
||||
view = self.getController().getActiveView()
|
||||
view.resetLayerData()
|
||||
view.setLayer(9999999)
|
||||
view.calculateMaxLayers()
|
||||
self.callLater(lambda: self.getController().setActiveView("SimulationView"))
|
||||
|
||||
block_slicing_decorator = BlockSlicingDecorator()
|
||||
node.addDecorator(block_slicing_decorator)
|
||||
|
|
@ -1544,12 +1542,11 @@ class CuraApplication(QtApplication):
|
|||
"""
|
||||
Checks if the given file URL is a valid project file.
|
||||
"""
|
||||
file_path = QUrl(file_url).toLocalFile()
|
||||
workspace_reader = self.getWorkspaceFileHandler().getReaderForFile(file_path)
|
||||
if workspace_reader is None:
|
||||
return False # non-project files won't get a reader
|
||||
try:
|
||||
file_path = QUrl(file_url).toLocalFile()
|
||||
workspace_reader = self.getWorkspaceFileHandler().getReaderForFile(file_path)
|
||||
if workspace_reader is None:
|
||||
return False # non-project files won't get a reader
|
||||
|
||||
result = workspace_reader.preRead(file_path, show_dialog=False)
|
||||
return result == WorkspaceReader.PreReadResult.accepted
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue