From f37df3f36c3a90de4a70f312bb1f75587f419ae2 Mon Sep 17 00:00:00 2001 From: systemoperator <3658393+systemoperator@users.noreply.github.com> Date: Wed, 29 Jan 2020 19:13:44 +0100 Subject: [PATCH] quick fix for pending issue: editing an ExternalFileType works now (still room for improvement); visual bug concerning "lazy" update of table could be a Linux issue, since other tables are affected as well; so basically - except the "lazy" update thing -- everyting works concerning external file types --- .../gui/externalfiletype/CustomizeExternalFileTypesDialog.java | 1 + .../externalfiletype/CustomizeExternalFileTypesViewModel.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesDialog.java b/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesDialog.java index e7a2d1492efb..31a888bf111c 100644 --- a/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesDialog.java +++ b/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesDialog.java @@ -40,6 +40,7 @@ public CustomizeExternalFileTypesDialog() { this.setResultConverter(button -> { if (button == ButtonType.OK) { viewModel.storeSettings(); + fileTypesTable.refresh(); } return null; }); diff --git a/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesViewModel.java b/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesViewModel.java index 4a250f6f5493..e7ee73267b2e 100644 --- a/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesViewModel.java +++ b/src/main/java/org/jabref/gui/externalfiletype/CustomizeExternalFileTypesViewModel.java @@ -49,6 +49,8 @@ private void showEditDialog(ExternalFileType type, String dialogTitle) { typeForEdit = (CustomExternalFileType) type; } else { typeForEdit = new CustomExternalFileType(type); + fileTypes.add(fileTypes.indexOf(type), typeForEdit); + fileTypes.remove(type); } EditExternalFileTypeEntryDialog dlg = new EditExternalFileTypeEntryDialog(typeForEdit, dialogTitle);