Revision 4d0daece
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4Composite.java | ||
---|---|---|
341 | 341 |
List<CdmBase> selection = new ArrayList<>(); |
342 | 342 |
int[] fullySelectedRowPositions = bodyLayer.getSelectionLayer().getFullySelectedRowPositions(); |
343 | 343 |
for (int i : fullySelectedRowPositions) { |
344 |
Object rowObject = bodyDataProvider.getRowObject(i); |
|
344 |
/* |
|
345 |
* Differentiation between "index" and "position" is important here |
|
346 |
* "position" is the current visible index "index" refers to the |
|
347 |
* underlying data model deleting an entity could lead to an |
|
348 |
* IndexOutOfBoundExceptions if the position is used |
|
349 |
*/ |
|
350 |
int rowIndexByPosition = natTable.getRowIndexByPosition(i); |
|
351 |
Object rowObject = bodyDataProvider.getRowObject(rowIndexByPosition); |
|
345 | 352 |
if(rowObject instanceof CdmBase){ |
346 | 353 |
selection.add((CdmBase) rowObject); |
347 | 354 |
} |
Also available in: Unified diff
ref #7614 Fix possible IndexOutOfBoundException