Skip to content

Commit 3621cae

Browse files
authored
Merge pull request #3569 from ControlSystemStudio/CSSTUDIO-3481
Fix tags selection not shown in text field
2 parents b679b0a + 37ea5b0 commit 3621cae

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -396,15 +396,11 @@ public void initialize() {
396396
logbooksLabel.setTextFill(Color.BLACK);
397397
});
398398

399-
logbooksSelection.textProperty().bind(Bindings.createStringBinding(() -> {
400-
if (selectedLogbooks.isEmpty()) {
401-
return "";
402-
}
403-
StringBuilder stringBuilder = new StringBuilder();
404-
selectedLogbooks.forEach(l -> stringBuilder.append(l).append(", "));
405-
String text = stringBuilder.toString();
406-
return text.substring(0, text.length() - 2);
407-
}, selectedLogbooks));
399+
logbooksSelection.textProperty().bind(Bindings.createStringBinding(() ->
400+
selectedLogbooks.stream().collect(Collectors.joining(",")), selectedLogbooks));
401+
402+
tagsSelection.textProperty().bind(Bindings.createStringBinding(() ->
403+
selectedTags.stream().collect(Collectors.joining(",")), selectedTags));
408404

409405
logbooksDropdownButton.focusedProperty().addListener((changeListener, oldVal, newVal) ->
410406
{

0 commit comments

Comments
 (0)