Changeset 20834 in osm for applications/editors


Ignore:
Timestamp:
2010-04-08T07:52:12+02:00 (14 years ago)
Author:
roland
Message:

Public Transport Plugin: Making UndoRedo possible

Location:
applications/editors/josm
Files:
1 added
3 edited

Legend:

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

    r20815 r20834  
    6666  private static TrackReference currentTrack = null;
    6767  private static WaypointTableModel waypointTM = null;
     68  public boolean inEvent = false;
    6869 
    6970  public StopImporterAction()
     
    128129    else if ("stopImporter.settingsGPSTimeStart".equals(event.getActionCommand()))
    129130    {
    130       if ((dialog.gpsTimeStartValid()) && (currentTrack != null))
    131       {
     131      if ((!inEvent) && (dialog.gpsTimeStartValid()) && (currentTrack != null))
     132        Main.main.undoRedo.add(new TrackStoplistRelocateCommand(this));
     133/*      {
    132134        currentTrack.gpsSyncTime = dialog.getGpsTimeStart();
    133135        currentTrack.relocateNodes();
    134       }
     136      }*/
    135137    }
    136138    else if ("stopImporter.settingsStopwatchStart".equals(event.getActionCommand()))
    137139    {
    138       if ((dialog.stopwatchStartValid()) && (currentTrack != null))
    139       {
     140      if ((!inEvent) && (dialog.stopwatchStartValid()) && (currentTrack != null))
     141        Main.main.undoRedo.add(new TrackStoplistRelocateCommand(this));
     142/*      {
    140143        currentTrack.stopwatchStart = dialog.getStopwatchStart();
    141144        currentTrack.relocateNodes();
    142       }
     145      }*/
    143146    }
    144147    else if ("stopImporter.settingsTimeWindow".equals(event.getActionCommand()))
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterDialog.java

    r20742 r20834  
    575575  }
    576576 
     577  public void setGpsTimeStart(String s)
     578  {
     579    tfGPSTimeStart.setText(s);
     580  }
     581 
    577582  public boolean stopwatchStartValid()
    578583  {
     
    593598  {
    594599    return tfStopwatchStart.getText();
     600  }
     601 
     602  public void setStopwatchStart(String s)
     603  {
     604    tfStopwatchStart.setText(s);
    595605  }
    596606 
Note: See TracChangeset for help on using the changeset viewer.