mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
scroll selection to visible on switching between tree and list view
This commit is contained in:
@@ -190,6 +190,8 @@ public class DualView extends JPanel {
|
||||
if (myCurrentView instanceof JBTable) {
|
||||
((JBTable)myCurrentView).setStriped(true);
|
||||
}
|
||||
final int row = myCurrentView.getSelectedRow();
|
||||
myCurrentView.scrollRectToVisible(myCurrentView.getCellRect(row, 0, true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +306,7 @@ public class DualView extends JPanel {
|
||||
SelectionProvider visibleTable = (SelectionProvider)getVisibleTable();
|
||||
Collection selection = visibleTable.getSelection();
|
||||
for (Iterator each = selection.iterator(); each.hasNext();) {
|
||||
result.add((Object)each.next());
|
||||
result.add(each.next());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user