diff --git a/src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java b/src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java index 213d8bffb00..1fec4bceac6 100644 --- a/src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java +++ b/src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java @@ -26,7 +26,7 @@ public AutosaveUIManager(BasePanel panel) { @Subscribe public void listen(@SuppressWarnings("unused") AutosaveEvent event) { try { - new SaveDatabaseAction(panel, Globals.prefs, Globals.entryTypesManager).save(); + new SaveDatabaseAction(panel, Globals.prefs, Globals.entryTypesManager).save(true); } catch (Throwable e) { LOGGER.error("Problem occured while saving.", e); } diff --git a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java index 147d527ca88..0d53a9fc8e4 100644 --- a/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java +++ b/src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java @@ -120,6 +120,7 @@ private void saveWithDifferentEncoding(Path file, boolean selectedOnly, Charset } private boolean doSave() { + panel.setSaving(true); Path targetPath = panel.getBibDatabaseContext().getDatabasePath().get(); try { // Save the database @@ -158,9 +159,14 @@ private boolean doSave() { } public boolean save() { + return save(false); + } + + public boolean save(boolean silent) { if (panel.getBibDatabaseContext().getDatabasePath().isPresent()) { - panel.frame().getDialogService().notify(Localization.lang("Saving library") + "..."); - panel.setSaving(true); + if (!silent) { + panel.frame().getDialogService().notify(Localization.lang("Saving library") + "..."); + } return doSave(); } else { Optional savePath = getSavePath();