Merge pull request 'Fix ChangeManagerWrapper' (#8) from b/javafx-wrapper-properties into develop
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good

Reviewed-on: https://git.kske.dev/zdm/undo-redo/pulls/8
Reviewed-by: DieGurke <maxi@kske.dev>
Reviewed-by: delvh <leon@kske.dev>
This commit is contained in:
Kai S. K. Engelbart 2021-12-25 21:14:53 +01:00
commit ae2f2e8a84
Signed by: Käfer & Engelbart Git
GPG Key ID: 70F2F9206EDC1FCE
2 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ public class ChangeManagerWrapper<C extends Change, M extends ChangeManager<C>>
*/
public ChangeManagerWrapper(M manager) {
this.manager = manager;
updateProperties();
}
@Override

View File

@ -21,7 +21,7 @@ public interface ObservableChangeManager<C extends Change> extends ChangeManager
@Override
default Optional<C> getLastChange() {
return Optional.of(lastChangeProperty().get());
return Optional.ofNullable(lastChangeProperty().get());
}
ReadOnlyBooleanProperty atMarkedChangeProperty();