File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/java/org/openmicroscopy/shoola/agents/measurement/view Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -313,13 +313,20 @@ void selectROI(List<Long> roiIDs)
313
313
l .add (array [j ]);
314
314
}
315
315
if (roiIDs .size () <= l .size ()) table .clearSelection ();
316
+ // Check the number of rows
317
+ int count = table .getModel ().getRowCount ();
316
318
while (i .hasNext ()) {
317
319
id = i .next ();
318
320
if (rowIDs .containsKey (id )) {
319
321
index = rowIDs .get (id );
320
- if (!l .contains (index )) {
321
- table .addRowSelectionInterval (index , index );
322
- scrollToRow (index );
322
+ if (index >= count ) {
323
+ table .clearSelection ();
324
+ break ;
325
+ } else {
326
+ if (!l .contains (index )) {
327
+ table .addRowSelectionInterval (index , index );
328
+ scrollToRow (index );
329
+ }
323
330
}
324
331
}
325
332
}
You can’t perform that action at this time.
0 commit comments