From af292bc73eb4e8298b3d4af7009428298dcf2c81 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Mon, 7 Dec 2020 19:47:42 +0100 Subject: [PATCH] fix setting of tab title in wrong thread not on fx thread --- src/main/java/org/jabref/gui/LibraryTab.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/LibraryTab.java b/src/main/java/org/jabref/gui/LibraryTab.java index b8f1f8aabf5..5d50d770f9a 100644 --- a/src/main/java/org/jabref/gui/LibraryTab.java +++ b/src/main/java/org/jabref/gui/LibraryTab.java @@ -313,13 +313,16 @@ public void updateTabTitle(boolean isChanged) { addSharedDbInformation(toolTipText, bibDatabaseContext); } addModeInfo(toolTipText, bibDatabaseContext); - if (databaseLocation == DatabaseLocation.LOCAL && bibDatabaseContext.getDatabase().hasEntries()) { + if ((databaseLocation == DatabaseLocation.LOCAL) && bibDatabaseContext.getDatabase().hasEntries()) { addChangedInformation(toolTipText, Localization.lang("untitled")); } } - textProperty().setValue(tabTitle.toString()); - setTooltip(new Tooltip(toolTipText.toString())); + DefaultTaskExecutor.runInJavaFXThread(() -> { + textProperty().setValue(tabTitle.toString()); + setTooltip(new Tooltip(toolTipText.toString())); + }); + } private static void addChangedInformation(StringBuilder text, String fileName) {