Update properties on wrapper creation, fix NPE
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good
This commit is contained in:
parent
4a70d954ef
commit
7101523584
@ -47,6 +47,7 @@ public class ChangeManagerWrapper<C extends Change, M extends ChangeManager<C>>
|
|||||||
*/
|
*/
|
||||||
public ChangeManagerWrapper(M manager) {
|
public ChangeManagerWrapper(M manager) {
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
|
updateProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,7 +21,7 @@ public interface ObservableChangeManager<C extends Change> extends ChangeManager
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
default Optional<C> getLastChange() {
|
default Optional<C> getLastChange() {
|
||||||
return Optional.of(lastChangeProperty().get());
|
return Optional.ofNullable(lastChangeProperty().get());
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadOnlyBooleanProperty atMarkedChangeProperty();
|
ReadOnlyBooleanProperty atMarkedChangeProperty();
|
||||||
|
Reference in New Issue
Block a user