mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
fix oneway field showing "Assumed to be Yes" if cycled through
…back to the default state. This was a slight regression from the refactoring in #10730: In an intermeditate step, the entity has `oneway=yes`, which should actually be ignored when determining if an entity has an implicit oneway state.
This commit is contained in:
@@ -45,6 +45,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :white_check_mark: Validation
|
||||
#### :bug: Bugfixes
|
||||
* Refresh numeric input fields after leaving focus with the value that is stored in the tag ([#11027])
|
||||
* Fix oneway field falsely showing "Assumed to be Yes" if cycled through all options back to the default state
|
||||
#### :earth_asia: Localization
|
||||
#### :hourglass: Performance
|
||||
#### :mortar_board: Walkthrough / Help
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { dispatch as d3_dispatch } from 'd3-dispatch';
|
||||
|
||||
import {
|
||||
select as d3_select
|
||||
} from 'd3-selection';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
import { utilRebind } from '../../util/rebind';
|
||||
import { t } from '../../core/localizer';
|
||||
import { actionReverse } from '../../actions/reverse';
|
||||
import { svgIcon } from '../../svg/icon';
|
||||
import { utilCheckTagDictionary } from '../../util';
|
||||
import { osmOneWayTags } from '../../osm/tags';
|
||||
|
||||
export { uiFieldCheck as uiFieldDefaultCheck };
|
||||
export { uiFieldCheck as uiFieldOnewayCheck };
|
||||
@@ -60,7 +62,7 @@ export function uiFieldCheck(field, context) {
|
||||
// where implied oneway tag exists (e.g. `junction=roundabout`) #2220, #1841
|
||||
if (field.id === 'oneway') {
|
||||
var entity = context.entity(_entityIDs[0]);
|
||||
if (entity.type === 'way' && entity.isOneWay()) {
|
||||
if (entity.type === 'way' && !!utilCheckTagDictionary(entity.tags, omit(osmOneWayTags, 'oneway'))) {
|
||||
_impliedYes = true;
|
||||
texts[0] = t.html('_tagging.presets.fields.oneway_yes.options.undefined');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user