Skip to content

Commit a9115a2

Browse files
r0lighttobiasdiez
authored andcommitted
put renaming of file entries in JavaFX thread for cleanup (#4818)
1 parent 133fbaa commit a9115a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/jabref/logic/cleanup/RenamePdfCleanup.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.util.Objects;
88
import java.util.Optional;
99

10+
import org.jabref.gui.util.DefaultTaskExecutor;
1011
import org.jabref.logic.externalfiles.LinkedFileHandler;
1112
import org.jabref.model.FieldChange;
1213
import org.jabref.model.cleanup.CleanupJob;
@@ -54,8 +55,8 @@ public List<FieldChange> cleanup(BibEntry entry) {
5455
}
5556

5657
if (changed) {
57-
Optional<FieldChange> changes = entry.setFiles(files);
58-
return OptionalUtil.toList(changes);
58+
Optional<FieldChange> fileFieldChanged = DefaultTaskExecutor.runInJavaFXThread(() -> entry.setFiles(files));
59+
return OptionalUtil.toList(fileFieldChanged);
5960
}
6061

6162
return Collections.emptyList();

0 commit comments

Comments
 (0)