Ignore:
Timestamp:
2010-02-14T17:49:04+01:00 (15 years ago)
Author:
roland
Message:

Minor bugfixes

File:
1 edited

Legend:

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

    r19987 r20003  
    208208      if (e.getType() == TableModelEvent.UPDATE)
    209209      {
     210        relation.setModified(true);
     211       
    210212        String key = (String)getValueAt(e.getFirstRow(), 0);
    211213        if (key == null)
     
    480482  private static JCheckBox cbLeft = null;
    481483  private static JTextField tfSuggestStopsLimit = null;
    482 /*  private static Vector< Relation > routes = new Vector< Relation >();*/
    483484  private static Relation currentRoute = null;
    484485  private static Vector< RelationMember > markedWays = new Vector< RelationMember >();
     
    595596      /*JComboBox*/ comboBox = new JComboBox();
    596597      comboBox.addItem("bus");
    597 /*      comboBox.addItem("tram");
     598      comboBox.addItem("tram");
    598599      comboBox.addItem("light_rail");
    599600      comboBox.addItem("subway");
    600       comboBox.addItem("rail");*/
     601      comboBox.addItem("rail");
    601602      requiredTagsTable.setCellEditor(1, 1, new DefaultCellEditor(comboBox));
    602603      rowContent = new Vector< String >();
     
    16951696      if (mainDataSet != null)
    16961697      {
     1698        String stopKey = "";
     1699        String stopValue = "";
     1700        if ("bus".equals(currentRoute.get("route")))
     1701        {
     1702          stopKey = "highway";
     1703          stopValue = "bus_stop";
     1704        }
     1705        else if ("tram".equals(currentRoute.get("route")))
     1706        {
     1707          stopKey = "highway";
     1708          stopValue = "tram_stop";
     1709        }
     1710        else if ("light_rail".equals(currentRoute.get("route")))
     1711        {
     1712          stopKey = "railway";
     1713          stopValue = "station";
     1714        }
     1715        else if ("subway".equals(currentRoute.get("route")))
     1716        {
     1717          stopKey = "railway";
     1718          stopValue = "station";
     1719        }
     1720        else if ("rail".equals(currentRoute.get("route")))
     1721        {
     1722          stopKey = "railway";
     1723          stopValue = "station";
     1724        }
     1725
    16971726        Collection< Node > nodeCollection = mainDataSet.getNodes();
    16981727        Iterator< Node > nodeIter = nodeCollection.iterator();
     
    17001729        {
    17011730          Node currentNode = nodeIter.next();
    1702           if ("bus_stop".equals(currentNode.get("highway")))
     1731          if (stopValue.equals(currentNode.get(stopKey)))
    17031732          {
    17041733            StopReference sr = detectMinDistance
Note: See TracChangeset for help on using the changeset viewer.