Changeset 3251 in josm


Ignore:
Timestamp:
May 15, 2010 3:15:51 PM (3 years ago)
Author:
stoecker
Message:

fixed #5016 - object download did not focus object

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r2986 r3251  
    5757            return; 
    5858        } 
     59        zoomTo(sel); 
     60    } 
     61 
     62    public static void zoomTo(Collection<OsmPrimitive> sel) { 
    5963        BoundingXYVisitor bboxCalculator = new BoundingXYVisitor(); 
    6064        bboxCalculator.computeBoundingBox(sel); 
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadPrimitiveTask.java

    r3083 r3251  
    1010import javax.swing.SwingUtilities; 
    1111 
     12import org.openstreetmap.josm.actions.AutoScaleAction; 
    1213import org.openstreetmap.josm.data.osm.DataSet; 
    1314import org.openstreetmap.josm.data.osm.PrimitiveId; 
     
    6970                layer.mergeFrom(ds); 
    7071                layer.onPostDownloadFromServer(); 
     72                AutoScaleAction.zoomTo(ds.allPrimitives()); 
    7173            } 
    7274        }; 
Note: See TracChangeset for help on using the changeset viewer.