Skip to content

Commit

Permalink
Lib manager GUI is updated after installing/upgrading library
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Jul 23, 2020
1 parent a81772a commit 851b5b1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 851b5b1

Please sign in to comment.