diff --git a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java index 67221f91c3e..5d2c1a134f4 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java +++ b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java @@ -197,8 +197,11 @@ protected void onUpdatePressed() { try { setProgressVisible(true, ""); installer.updateIndex(this::setProgress); - ((LibrariesIndexTableModel) contribModel).update(); onIndexesUpdated(); + if (contribTable.getCellEditor() != null) { + contribTable.getCellEditor().stopCellEditing(); + } + ((LibrariesIndexTableModel) contribModel).update(); } catch (Exception e) { throw new RuntimeException(e); } finally { @@ -234,12 +237,11 @@ public void onInstallPressed(final ContributedLibrary lib) { } else { installer.install(lib, this::setProgress); } - // TODO: Do a better job in refreshing only the needed element + onIndexesUpdated(); if (contribTable.getCellEditor() != null) { contribTable.getCellEditor().stopCellEditing(); } ((LibrariesIndexTableModel) contribModel).update(); - onIndexesUpdated(); } catch (Exception e) { throw new RuntimeException(e); } finally { @@ -266,12 +268,11 @@ public void onRemovePressed(final ContributedLibrary lib) { try { setProgressVisible(true, tr("Removing...")); installer.remove(lib, this::setProgress); - // TODO: Do a better job in refreshing only the needed element + onIndexesUpdated(); if (contribTable.getCellEditor() != null) { contribTable.getCellEditor().stopCellEditing(); } ((LibrariesIndexTableModel) contribModel).update(); - onIndexesUpdated(); } catch (Exception e) { throw new RuntimeException(e); } finally {