Commit f5230f6
committed
De-duplicate widget inputs by String comparison
When populating potential items for an input widget, we now prefer
existing objects of a given input type to potentially convertiable
types.
Further, for convertibles we now avoid considering them if they share a
toString with any other potential input. Candidates are prioritized in
order returned by ConvertService.getCompatibleInputs.
This mitigates the potential for duplicate entries in input harvesters
when multiple input instances are convertible to the same effective
output instance.1 parent 0d95340 commit f5230f6
File tree
1 file changed
+21
-5
lines changed- src/main/java/org/scijava/widget
1 file changed
+21
-5
lines changedLines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
0 commit comments