Changeset 3393 in josm for trunk/src/org
- Timestamp:
- 2010-07-29T19:24:26+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
r3371 r3393 64 64 public void executeFilters() { 65 65 DataSet ds = Main.main.getCurrentDataSet(); 66 if (ds == null) 67 return; 68 69 final Collection<OsmPrimitive> deselect = new HashSet<OsmPrimitive>(); 70 71 ds.beginUpdate(); 72 try { 73 74 final Collection<OsmPrimitive> all = ds.allNonDeletedCompletePrimitives(); 75 76 FilterWorker.executeFilters(all, filterMatcher); 77 66 if (ds == null) { 67 disabledAndHiddenCount = 0; 78 68 disabledCount = 0; 79 disabledAndHiddenCount = 0; 80 // collect disabled and selected the primitives 81 for (OsmPrimitive osm : all) { 82 if (osm.isDisabled()) { 83 disabledCount++; 84 if (osm.isSelected()) { 85 deselect.add(osm); 86 } 87 if (osm.isDisabledAndHidden()) { 88 disabledAndHiddenCount++; 69 } else { 70 final Collection<OsmPrimitive> deselect = new HashSet<OsmPrimitive>(); 71 72 ds.beginUpdate(); 73 try { 74 75 final Collection<OsmPrimitive> all = ds.allNonDeletedCompletePrimitives(); 76 77 FilterWorker.executeFilters(all, filterMatcher); 78 79 disabledCount = 0; 80 disabledAndHiddenCount = 0; 81 // collect disabled and selected the primitives 82 for (OsmPrimitive osm : all) { 83 if (osm.isDisabled()) { 84 disabledCount++; 85 if (osm.isSelected()) { 86 deselect.add(osm); 87 } 88 if (osm.isDisabledAndHidden()) { 89 disabledAndHiddenCount++; 90 } 89 91 } 90 92 } 93 disabledCount -= disabledAndHiddenCount; 94 } finally { 95 ds.endUpdate(); 91 96 } 92 disabledCount -= disabledAndHiddenCount; 93 } finally { 94 ds.endUpdate(); 95 } 96 97 if (!deselect.isEmpty()) { 98 ds.clearSelection(deselect); 99 } 100 101 Main.map.mapView.repaint(); 102 Main.map.filterDialog.updateDialogHeader(); 97 98 if (!deselect.isEmpty()) { 99 ds.clearSelection(deselect); 100 } 101 } 102 103 if (Main.isDisplayingMapView()) { 104 Main.map.mapView.repaint(); 105 Main.map.filterDialog.updateDialogHeader(); 106 } 103 107 } 104 108
Note:
See TracChangeset
for help on using the changeset viewer.