mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-18 10:37:43 +00:00
5114 make first group selected by default
This commit is contained in:
parent
8213a85ca0
commit
bd84a831f5
@ -45,7 +45,7 @@ class GroupListPanel extends javax.swing.JPanel {
|
|||||||
results = new LinkedHashMap<>();
|
results = new LinkedHashMap<>();
|
||||||
groupList.setListData(new String[0]);
|
groupList.setListData(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
void handleSearchCompleteEvent(DiscoveryEvents.SearchCompleteEvent searchCompleteEvent) {
|
void handleSearchCompleteEvent(DiscoveryEvents.SearchCompleteEvent searchCompleteEvent) {
|
||||||
try {
|
try {
|
||||||
@ -53,6 +53,9 @@ class GroupListPanel extends javax.swing.JPanel {
|
|||||||
results = searchCompleteEvent.getSearchResults().toLinkedHashMap();
|
results = searchCompleteEvent.getSearchResults().toLinkedHashMap();
|
||||||
Set<String> resultsKeySet = results.keySet();
|
Set<String> resultsKeySet = results.keySet();
|
||||||
groupList.setListData(resultsKeySet.toArray(new String[results.size()]));
|
groupList.setListData(resultsKeySet.toArray(new String[results.size()]));
|
||||||
|
if (groupList.getModel().getSize() > 0) {
|
||||||
|
groupList.setSelectedIndex(0);
|
||||||
|
}
|
||||||
validate();
|
validate();
|
||||||
repaint();
|
repaint();
|
||||||
} catch (FileSearchException ex) {
|
} catch (FileSearchException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user