Reset openAsUcp at the start of preread

CURA-11403
This commit is contained in:
Saumya Jain 2024-03-06 12:32:05 +01:00
parent 3aefe729ed
commit 831a1d4876
2 changed files with 5 additions and 3 deletions

View file

@ -1986,7 +1986,6 @@ class CuraApplication(QtApplication):
Logger.warning(f"Workspace reader not found, cannot read file {file_name}.")
return
workspace_reader.getReaderForFile(file_name).setOpenAsUcp(True)
workspace_reader.readLocalFile(file, add_to_recent_files)
@pyqtSlot(QUrl, str, bool)
@ -2209,6 +2208,8 @@ class CuraApplication(QtApplication):
if workspace_reader is None:
return False # non-project files won't get a reader
try:
if workspace_reader.getPluginId() == "3MFReader":
workspace_reader.clearOpenAsUcp()
result = workspace_reader.preRead(file_path, show_dialog=False)
return result == WorkspaceReader.PreReadResult.accepted
except: