Skip to content

Commit

Permalink
Merge pull request #2779 from ControlSystemStudio/CSSTUDIO-2014
Browse files Browse the repository at this point in the history
CSSTUDIO-2014 Sort PVList table after "refresh" & add default sorting according to name.
  • Loading branch information
shroffk authored Aug 21, 2023
2 parents aa7e294 + 126b33e commit 5de6b5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/ui/src/main/java/org/phoebus/ui/pv/PVList.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private void createTableColumns()
name_col.setCellValueFactory(cell -> cell.getValue().name);
name_col.setMaxWidth(400.0);
table.getColumns().add(name_col);
table.getSortOrder().setAll(name_col); // By default, sort according to PV-name.

final TableColumn<PVInfo, Number> ref_col = new TableColumn<>(Messages.PVListTblReferences);
ref_col.setCellValueFactory(cell -> cell.getValue().references);
Expand Down Expand Up @@ -211,6 +212,7 @@ private void triggerRefresh()
{
table.getItems().clear();
table.getItems().addAll(items);
table.sort();
});
});
}
Expand Down

0 comments on commit 5de6b5f

Please sign in to comment.