fix for identical file names in results

dbus-notify
Zlatin Balevsky 2022-04-19 08:00:38 +01:00
parent ff2e4be347
commit 0758108d19
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 3 additions and 2 deletions

View File

@ -71,8 +71,9 @@ class ResultTreeModel extends DefaultTreeModel {
Object [] elementData = children.elementData
int idx = Arrays.binarySearch(elementData, 0, getChildCount(), newChild)
if (idx >= 0)
throw new IllegalStateException("duplicate result inserted?")
idx = - idx - 1
idx++
else
idx = - idx - 1
insert(newChild, idx)
}