Changeset 35200 in osm for applications/editors/josm/plugins/indoorhelper
- Timestamp:
- 2019-10-27T13:46:14+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java
r34741 r35200 43 43 import org.openstreetmap.josm.actions.mapmode.SelectAction; 44 44 import org.openstreetmap.josm.data.Preferences; 45 import org.openstreetmap.josm.data.osm.DataSet; 45 46 import org.openstreetmap.josm.data.osm.OsmDataManager; 46 47 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 571 572 public void unsetSpecificKeyFilter(String key) { 572 573 573 Collection<OsmPrimitive> p = OsmDataManager.getInstance().getEditDataSet().allPrimitives(); 574 int level = Integer.parseInt(levelValue); 575 576 //Find all primitives with the specific tag and check if value is part of the current 577 //workinglevel. After that unset the disabled status. 578 for (OsmPrimitive osm: p) { 579 if ((osm.isDisabledAndHidden() || osm.isDisabled()) && osm.hasKey(key)) { 580 for (Map.Entry<String, String> e: osm.getInterestingTags().entrySet()) { 581 if (e.getKey().equals(key)) { 582 //Compare values to current working level 583 if (IndoorLevel.isPartOfWorkingLevel(e.getValue(), level)) { 584 osm.unsetDisabledState(); 585 } else { 586 osm.setDisabledState(true); 574 DataSet editDataSet = OsmDataManager.getInstance().getEditDataSet(); 575 if (editDataSet != null) { 576 Collection<OsmPrimitive> p = editDataSet.allPrimitives(); 577 int level = Integer.parseInt(levelValue); 578 579 //Find all primitives with the specific tag and check if value is part of the current 580 //workinglevel. After that unset the disabled status. 581 for (OsmPrimitive osm: p) { 582 if ((osm.isDisabledAndHidden() || osm.isDisabled()) && osm.hasKey(key)) { 583 for (Map.Entry<String, String> e: osm.getInterestingTags().entrySet()) { 584 if (e.getKey().equals(key)) { 585 //Compare values to current working level 586 if (IndoorLevel.isPartOfWorkingLevel(e.getValue(), level)) { 587 osm.unsetDisabledState(); 588 } else { 589 osm.setDisabledState(true); 590 } 587 591 } 588 }592 } 589 593 } 590 594 }
Note:
See TracChangeset
for help on using the changeset viewer.