Changeset 20791 in osm for applications/editors


Ignore:
Timestamp:
2010-04-06T10:55:39+02:00 (14 years ago)
Author:
roland
Message:

Public Transport Plugin: Making UndoRedo possible

Location:
applications/editors/josm/plugins/public_transport/src/public_transport
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java

    r20773 r20791  
    304304  {
    305305    Node node = new Node(latLon);
    306     if ("bus".equals(type))
    307       node.put("highway", "bus_stop");
    308     else if ("tram".equals(type))
    309       node.put("railway", "tram_stop");
    310     else if ("light_rail".equals(type))
    311       node.put("railway", "station");
    312     else if ("subway".equals(type))
    313       node.put("railway", "station");
    314     else if ("rail".equals(type))
    315       node.put("railway", "station");
     306    setTagsWrtType(node, type);
    316307    node.put("name", name);
    317308    if (Main.main.getCurrentDataSet() == null)
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointTableModel.java

    r20772 r20791  
    99import javax.swing.table.DefaultTableModel;
    1010
     11import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.data.coor.LatLon;
    1213import org.openstreetmap.josm.data.gpx.WayPoint;
     
    1718{
    1819  private StopImporterAction controller = null;
     20  public boolean inEvent = false;
    1921  public Vector< Node > nodes = new Vector< Node >();
    2022  public Vector< LatLon > coors = new Vector< LatLon >();
     
    8688    if (e.getType() == TableModelEvent.UPDATE)
    8789    {
     90      if (inEvent)
     91        return;
     92      Main.main.undoRedo.add(new WaypointsNameCommand
     93          (this, e.getFirstRow(), (String)getValueAt(e.getFirstRow(), 1)));
     94    }
     95/*    {
    8896      if (nodes.elementAt(e.getFirstRow()) != null)
    8997      {
     
    9199        node.put("name", (String)getValueAt(e.getFirstRow(), 1));
    92100      }
    93     }
     101    }*/
    94102  }
    95103};
Note: See TracChangeset for help on using the changeset viewer.