From 28bcae3b4fb950ef598743dcc2878e92a4d9d7f8 Mon Sep 17 00:00:00 2001 From: georgweiss Date: Wed, 18 Dec 2024 10:08:58 +0100 Subject: [PATCH] Bug fix log entry update --- .../logbook/olog/ui/write/LogEntryEditorController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java index 5950e3321..971afc172 100644 --- a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java +++ b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java @@ -368,7 +368,9 @@ public void initialize() { titleProperty.set(logEntry.getTitle()); textArea.textProperty().bindBidirectional(descriptionProperty); - descriptionProperty.set(logEntry.getDescription() != null ? logEntry.getDescription() : ""); + // When editing an existing entry, set the description to the source of the entry. + descriptionProperty.set(editMode.equals(EditMode.UPDATE_LOG_ENTRY) ? logEntry.getSource() : + (logEntry.getDescription() != null ? logEntry.getDescription() : "")); descriptionProperty.addListener((observable, oldValue, newValue) -> isDirty = true); Image tagIcon = ImageCache.getImage(LogEntryEditorController.class, "/icons/add_tag.png");