From 71476c3cbae7a2ff2e89b7ded96aa8a5de5f5a95 Mon Sep 17 00:00:00 2001 From: Abraham Wolk Date: Tue, 20 Aug 2024 11:44:07 +0200 Subject: [PATCH] CSSTUDIO-2555 Handle the case where logEntry.getDescription() returns null, also. --- .../olog/ui/write/LogEntryUpdateController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryUpdateController.java b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryUpdateController.java index f01aadd7f8..dfb9c0727a 100644 --- a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryUpdateController.java +++ b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryUpdateController.java @@ -273,7 +273,15 @@ public void initialize() { titleProperty.set(logEntry.getTitle()); textArea.textProperty().bindBidirectional(descriptionProperty); - descriptionProperty.set(logEntry.getSource() != null ? logEntry.getSource() : logEntry.getDescription()); + if (logEntry.getSource() != null) { + descriptionProperty.set(logEntry.getSource()); + } + else if (logEntry.getDescription() != null) { + descriptionProperty.set(logEntry.getDescription()); + } + else { + descriptionProperty.set(""); + } descriptionProperty.addListener((observable, oldValue, newValue) -> isDirty = true); Image tagIcon = ImageCache.getImage(LogEntryUpdateController.class, "/icons/add_tag.png");