diff options
Diffstat (limited to 'frontend/client')
-rw-r--r-- | frontend/client/src/autotest/common/table/SelectionManager.java | 8 | ||||
-rw-r--r-- | frontend/client/src/autotest/common/table/TableDecorator.java | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/frontend/client/src/autotest/common/table/SelectionManager.java b/frontend/client/src/autotest/common/table/SelectionManager.java index 1c10e35c..517e8795 100644 --- a/frontend/client/src/autotest/common/table/SelectionManager.java +++ b/frontend/client/src/autotest/common/table/SelectionManager.java @@ -90,7 +90,7 @@ public class SelectionManager implements TableWidgetFactory, TableWidgetClickLis * Select all objects in the table. */ public void selectAll() { - selectObjects(attachedTable.getAllRows()); + selectVisible(); } public void deselectAll() { @@ -100,11 +100,7 @@ public class SelectionManager implements TableWidgetFactory, TableWidgetClickLis } public void selectVisible() { - List<JSONObject> rowsToAdd = new ArrayList<JSONObject>(); - for (int i = 0; i < attachedTable.getRowCount(); i++) { - rowsToAdd.add(attachedTable.getRow(i)); - } - selectObjects(rowsToAdd); + selectObjects(attachedTable.getAllRows()); } public void toggleSelected(JSONObject object) { diff --git a/frontend/client/src/autotest/common/table/TableDecorator.java b/frontend/client/src/autotest/common/table/TableDecorator.java index ae3892cc..7b889732 100644 --- a/frontend/client/src/autotest/common/table/TableDecorator.java +++ b/frontend/client/src/autotest/common/table/TableDecorator.java @@ -69,7 +69,7 @@ public class TableDecorator extends Composite implements DynamicTableListener { } public SelectionManager addSelectionManager(boolean selectOnlyOne) { - selectionManager = new SelectionManager(dataTable, selectOnlyOne); + selectionManager = new DynamicTableSelectionManager(dataTable, selectOnlyOne); dataTable.addListener(this); return selectionManager; } |