diff --git a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java index e65500c2428c..d446925dd85c 100644 --- a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java +++ b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java @@ -371,7 +371,7 @@ public class InjectionsSettingsUI implements Configurable { private List getSelectedInjections() { final ArrayList toRemove = new ArrayList(); for (int row : myInjectionsTable.getSelectedRows()) { - toRemove.add(myInjectionsTable.getItems().get(row)); + toRemove.add(myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row))); } return toRemove; } @@ -379,7 +379,7 @@ public class InjectionsSettingsUI implements Configurable { @Nullable private BaseInjection getSelectedInjection() { final int row = myInjectionsTable.getSelectedRow(); - return row < 0? null : myInjectionsTable.getItems().get(row); + return row < 0? null : myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row)); } private void performAdd(final AnActionEvent e) {