Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a restriction is creating a new restriction in the TR window #4951

Closed
abhisheksaikia opened this issue Mar 28, 2018 · 4 comments
Closed
Labels
bug A bug - let's fix this!

Comments

@abhisheksaikia
Copy link

While trying to delete a wrongly added restriction (no_u_turn) in iD, through the TR window, ended up creating a new restriction (only_u_turn) in addition to deleting the old one without any visible warnings.

trbug4

osm Change file:

<?xml version="1.0" encoding="UTF-8"?>
<osmChange version="0.6" generator="iD">
   <create>
      <relation id="-8" version="0">
         <member type="way" role="from" ref="417310791" />
         <member type="way" role="via" ref="573973104" />
         <member type="way" role="to" ref="573973107" />
         <tag k="type" v="restriction" />
         <tag k="restriction" v="only_u_turn" />
      </relation>
   </create>
   <modify />
   <delete if-unused="true">
      <relation id="8155829" version="1">
         <member type="way" role="from" ref="417310791" />
         <member type="way" role="via" ref="573973104" />
         <member type="way" role="to" ref="573973107" />
         <tag k="restriction" v="no_u_turn" />
         <tag k="type" v="restriction" />
      </relation>
   </delete>
</osmChange>
@abhisheksaikia abhisheksaikia changed the title Deleting a restriction creating a new restriction in the TR window Deleting a restriction is creating a new restriction in the TR window Mar 28, 2018
@bhousel
Copy link
Member

bhousel commented Mar 28, 2018

Thanks for reporting @abhisheksaikia - I noticed in the screenshot that the turn arrow didn't even turn blue (only_u_turn). Maybe the bug happens when the user can clicks very fast - is this what you did?

I'll check the code and try to reproduce the issue - we might have to block clicks until the graph update has caught up..

@bhousel bhousel added the bug A bug - let's fix this! label Mar 28, 2018
@srividyacb
Copy link

@bhousel

Area in OpenStreetMap

  • click the way in iD
  • Delete no_left and no_u turn-restriction
  • While deleting no_left - first click it changes to only_left (blue) and second click deletes the TR.
  • While deleting no_u - the first click (in single action) both only_u and deletion is happening (no visible change in colors).

(in gif you can notice, deletion of no_u doesn't change to blue but directly deletes but doesn't give indication of TR creation)

Follow the steps as per to reproduce the problem

new-relation

@bhousel
Copy link
Member

bhousel commented Mar 29, 2018

Awesome thanks @srividyacb and @abhisheksaikia for the detailed report 👍

@bhousel
Copy link
Member

bhousel commented Mar 29, 2018

Thanks this is fixed now..
The issue was that we were only allowing the only_ to go in one direction along the bidirectional connecting road. (I guess I was thinking about oneways the day I wrote that code).

Deleting the no_u restriction would cycle to an only_u restriction, but this restriction was ignored because of the bug, causing the turn arrow to turn green (even though that only_u was silently created).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

No branches or pull requests

3 participants