Skip to content

Commit e18261f

Browse files
committed
library manager: installed element is now displayed correctly
1 parent d4a1220 commit e18261f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ public void onInstallPressed(final ContributedLibrary lib, final Optional<Contri
218218
try {
219219
setProgressVisible(true, tr("Installing..."));
220220
installer.install(lib, mayReplaced, this::setProgress);
221-
onIndexesUpdated(); // TODO: Do a better job in refreshing only the needed element
222-
//getContribModel().updateLibrary(lib);
221+
onIndexesUpdated();
222+
// TODO: Do a better job in refreshing only the needed element
223+
((LibrariesIndexTableModel) contribModel).update();
223224
} catch (Exception e) {
224225
throw new RuntimeException(e);
225226
} finally {
@@ -246,8 +247,9 @@ public void onRemovePressed(final ContributedLibrary lib) {
246247
try {
247248
setProgressVisible(true, tr("Removing..."));
248249
installer.remove(lib, this::setProgress);
249-
onIndexesUpdated(); // TODO: Do a better job in refreshing only the needed element
250-
//getContribModel().updateLibrary(lib);
250+
onIndexesUpdated();
251+
// TODO: Do a better job in refreshing only the needed element
252+
((LibrariesIndexTableModel) contribModel).update();
251253
} catch (Exception e) {
252254
throw new RuntimeException(e);
253255
} finally {

0 commit comments

Comments
 (0)