From a3438fcb2cc257673fb86e0e13acfab93a7feb66 Mon Sep 17 00:00:00 2001 From: Loay Ghreeb Date: Sat, 20 Jul 2024 15:39:37 +0300 Subject: [PATCH] Use nextSet instead of nextUpdate --- src/main/java/com/tobiasdiez/easybind/MappedBackedList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/tobiasdiez/easybind/MappedBackedList.java b/src/main/java/com/tobiasdiez/easybind/MappedBackedList.java index 8f483ee..de513b7 100644 --- a/src/main/java/com/tobiasdiez/easybind/MappedBackedList.java +++ b/src/main/java/com/tobiasdiez/easybind/MappedBackedList.java @@ -45,8 +45,8 @@ protected void sourceChanged(ListChangeListener.Change change) { } nextPermutation(from, to, permutation); } else if (change.wasUpdated()) { - backingList.set(change.getFrom(), mapper.apply(getSource().get(change.getFrom()))); - nextUpdate(change.getFrom()); + E old = backingList.set(change.getFrom(), mapper.apply(getSource().get(change.getFrom()))); + nextSet(change.getFrom(), old); } else { if (change.wasRemoved()) { int removePosition = change.getFrom();