diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2020-07-15 19:51:14 +0300 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2020-07-23 13:10:45 +0300 |
commit | 851b5b14b1dc48572649e9a291d34415f018447f (patch) | |
tree | e07b84519763a307601fb8af87e1c72b33f492a2 /app | |
parent | a81772afc68fb1497b6374ad58d197ef84bcba4c (diff) |
Lib manager GUI is updated after installing/upgrading library
Diffstat (limited to 'app')
-rw-r--r-- | app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java index 67221f91c..5d2c1a134 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 @@ public class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease 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 class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease } 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 class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease 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 { |