From Mon Sep 17 00:00:00 2001
From: Matt McCutchen <matt@mattmccutchen.net>
Date: Mon, 2 Nov 2026 15:16:39 -0500
fix #24998 - Make `modified` search not match new deleted objects
Proof of concept; would need comments and tests.
---
src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java b/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
index 63c44141a2..87a518b034 100644
|
a
|
b
|
public class SearchCompiler {
|
| 1640 | 1640 | private static final class Modified extends Match { |
| 1641 | 1641 | @Override |
| 1642 | 1642 | public boolean match(OsmPrimitive osm) { |
| 1643 | | return osm.isModified() || osm.isNewOrUndeleted(); |
| | 1643 | // TODO comment |
| | 1644 | if (osm.isDeleted()) { |
| | 1645 | return !osm.isNew() && osm.isVisible(); |
| | 1646 | } else { |
| | 1647 | return osm.isModified() || osm.isNewOrUndeleted(); |
| | 1648 | } |
| 1644 | 1649 | } |
| 1645 | 1650 | |
| 1646 | 1651 | @Override |