mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Let the FileNotFound error be handled later in the read file process
An error will pop up by the ReadFileJob if the file cannot be found. If we also handle the File NotFound error in the checkIsValidProjectFile, then two error message will pop up in the user's screen, which is not desired. So, let only the ReadFileJob show it's error instead. CURA-7996
This commit is contained in:
parent
56b3cc5fe5
commit
7be67f43f8
1 changed files with 1 additions and 8 deletions
|
@ -1941,14 +1941,7 @@ class CuraApplication(QtApplication):
|
|||
try:
|
||||
result = workspace_reader.preRead(file_path, show_dialog=False)
|
||||
return result == WorkspaceReader.PreReadResult.accepted
|
||||
except FileNotFoundError:
|
||||
result_message = Message(text = self._i18n_catalog.i18nc("@info:status Don't translate the XML tag <filename>!",
|
||||
"Failed to load <filename>{0}</filename>. File is moved or deleted.",
|
||||
file_path), lifetime = 0,
|
||||
title = self._i18n_catalog.i18nc("@info:title", "Unable to Open File"))
|
||||
result_message.show()
|
||||
return False
|
||||
except Exception:
|
||||
except:
|
||||
Logger.logException("e", "Could not check file %s", file_url)
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue