- if way.tags!=attributes or way.nds!=nodes or !way.visible?
- new_way = Way.new
- new_way.tags = attributes
- new_way.nds = pointlist
- new_way.changeset_id = changeset
- new_way.version = version
+ pointlist.collect! {|a|
+ renumberednodes[a] ? renumberednodes[a]:a
+ } # renumber nodes
+ new_way = Way.new
+ new_way.tags = attributes
+ new_way.nds = pointlist
+ new_way.changeset_id = changeset
+ new_way.version = version
+ if originalway <= 0
+ new_way.create_with_history(user)
+ way=new_way # so we can get way.id and way.version
+ elsif way.tags!=attributes or way.nds!=pointlist or !way.visible?