Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2021-01-11 14:52:23 +0300
committerKostas Karmas <konskarm@gmail.com>2021-01-11 14:52:23 +0300
commit3282ad7a4169cd76f160a84781d30603ed9c1d7e (patch)
treebc2cefdcb88878c74704833cc68db7c9f03292e9
parent13d45e3a55d72742ac220177248637820b288578 (diff)
Don't add temporary files in the recent files list if F5 is pressed
CURA-7864
-rwxr-xr-xcura/CuraApplication.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py
index 98e2e923d0..76d48f9682 100755
--- a/cura/CuraApplication.py
+++ b/cura/CuraApplication.py
@@ -3,6 +3,7 @@
import os
import sys
+import tempfile
import time
from typing import cast, TYPE_CHECKING, Optional, Callable, List, Any, Dict
@@ -1477,7 +1478,8 @@ class CuraApplication(QtApplication):
for file_name, nodes in objects_in_filename.items():
for node in nodes:
- job = ReadMeshJob(file_name)
+ file_path = os.path.normpath(os.path.dirname(file_name))
+ job = ReadMeshJob(file_name, add_to_recent_files = file_path != tempfile.gettempdir()) # Don't add temp files to the recent files list
job._node = node # type: ignore
job.finished.connect(self._reloadMeshFinished)
if has_merged_nodes: