]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Centre editors correctly when note=N is specified
[rails.git] / app / controllers / site_controller.rb
index 7c8ee32b3f9f382504d98768b8994404c515b050..280f39fd8c32b597b7cbc13094044e5827033d02 100644 (file)
@@ -36,7 +36,7 @@ class SiteController < ApplicationController
   end
 
   def edit
-    editor = params[:editor] || @user.preferred_editor || DEFAULT_EDITOR
+    editor = preferred_editor
 
     if editor == "remote"
       render :action => :index
@@ -53,6 +53,10 @@ class SiteController < ApplicationController
       bbox = Way.find(params[:way]).bbox.to_unscaled
       @lat = bbox.centre_lat
       @lon = bbox.centre_lon
+    elsif params[:note]
+      note = Note.find(params[:note])
+      @lat = note.lat
+      @lon = note.lon
     elsif params[:gpx]
       trace = Trace.visible_to(@user).find(params[:gpx])
       @lat = trace.latitude