mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
[Lib manager] Fix only member being rendered incorrectly if filter active and update/install
This commit is contained in:
parent
b1b609e610
commit
0ee0fcc018
@ -200,7 +200,7 @@ public class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease
|
||||
try {
|
||||
setProgressVisible(true, "");
|
||||
installer.updateIndex(this::setProgress);
|
||||
onIndexesUpdated();
|
||||
//onIndexesUpdated();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
@ -218,8 +218,10 @@ public class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease
|
||||
try {
|
||||
setProgressVisible(true, tr("Installing..."));
|
||||
installer.install(lib, mayReplaced, this::setProgress);
|
||||
onIndexesUpdated();
|
||||
// TODO: Do a better job in refreshing only the needed element
|
||||
if (contribTable.getCellEditor() != null) {
|
||||
contribTable.getCellEditor().stopCellEditing();
|
||||
}
|
||||
((LibrariesIndexTableModel) contribModel).update();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -247,8 +249,10 @@ public class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease
|
||||
try {
|
||||
setProgressVisible(true, tr("Removing..."));
|
||||
installer.remove(lib, this::setProgress);
|
||||
onIndexesUpdated();
|
||||
// TODO: Do a better job in refreshing only the needed element
|
||||
if (contribTable.getCellEditor() != null) {
|
||||
contribTable.getCellEditor().stopCellEditing();
|
||||
}
|
||||
((LibrariesIndexTableModel) contribModel).update();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -260,9 +264,4 @@ public class LibraryManagerUI extends InstallerJDialog<ContributedLibraryRelease
|
||||
installerThread.setUncaughtExceptionHandler(new InstallerJDialogUncaughtExceptionHandler(this, noConnectionErrorMessage));
|
||||
installerThread.start();
|
||||
}
|
||||
|
||||
protected void onIndexesUpdated() throws Exception {
|
||||
// Empty
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -127,10 +127,6 @@ public abstract class InstallerJDialog<T> extends JDialog {
|
||||
contribTable.getCellEditor().stopCellEditing();
|
||||
}
|
||||
updateIndexFilter(filters, categoryFilter);
|
||||
if (contribModel.getRowCount() == 1) {
|
||||
// TODO: understand why it doesn't work
|
||||
//contribTable.addRowSelectionInterval(0, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user