mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-05 18:42:55 +00:00
bug6239: adjust selection model when *all* list of filterable panel has elements removed
This commit is contained in:
1 parent
9dca151018
commit
2daeb3f7a1
1 file changed
+3
@@ -272,6 +272,7 @@ public abstract class AbstractFilterablePanel<T> extends HorizontalPanel {
|
||||
* Removes an object and applies the search filter.
|
||||
*/
|
||||
public void remove(T object) {
|
||||
select(object, false); // clear the object that was removed from the selection
|
||||
all.getList().remove(object);
|
||||
filter();
|
||||
}
|
||||
@@ -287,11 +288,13 @@ public abstract class AbstractFilterablePanel<T> extends HorizontalPanel {
|
||||
* <code>removeAll(all)</code> with <code>all</code> being a copy of what you get when calling {@link #getAll()}.
|
||||
*/
|
||||
public void removeAll() {
|
||||
deselectAll();
|
||||
all.getList().clear();
|
||||
filter();
|
||||
}
|
||||
|
||||
public void removeAll(Iterable<T> objects) {
|
||||
objects.forEach(o->select(o, false)); // clear those objects removed from the selection
|
||||
Util.removeAll(objects, all.getList());
|
||||
filter();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user