Skip to content

Commit dc4ef64

Browse files
authored
Merge pull request #3214 from ControlSystemStudio/CSSTUDIO-2882
Bug fix log entry update
2 parents 368971f + 28bcae3 commit dc4ef64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ public void initialize() {
368368
titleProperty.set(logEntry.getTitle());
369369

370370
textArea.textProperty().bindBidirectional(descriptionProperty);
371-
descriptionProperty.set(logEntry.getDescription() != null ? logEntry.getDescription() : "");
371+
// When editing an existing entry, set the description to the source of the entry.
372+
descriptionProperty.set(editMode.equals(EditMode.UPDATE_LOG_ENTRY) ? logEntry.getSource() :
373+
(logEntry.getDescription() != null ? logEntry.getDescription() : ""));
372374
descriptionProperty.addListener((observable, oldValue, newValue) -> isDirty = true);
373375

374376
Image tagIcon = ImageCache.getImage(LogEntryEditorController.class, "/icons/add_tag.png");

0 commit comments

Comments
 (0)