Changeset 13212 in osm for applications/editors


Ignore:
Timestamp:
2009-01-14T21:52:11+01:00 (16 years ago)
Author:
hampelratte
Message:

store current cursor and restore that cursor after the action finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/action/NewIssueAction.java

    r12778 r13212  
    5454
    5555    private OsbPlugin plugin;
     56   
     57    private Cursor previousCursor;
    5658
    5759    public NewIssueAction(JToggleButton button, OsbPlugin plugin) {
     
    6466    protected void doActionPerformed(ActionEvent e) throws IOException {
    6567        if(button.isSelected()) {
     68            previousCursor = Main.map.mapView.getCursor();
    6669            Main.map.mapView.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
    6770            Main.map.mapView.addMouseListener(this);
     
    7275
    7376    private void reset() {
    74         Main.map.mapView.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
     77        Main.map.mapView.setCursor(previousCursor);
    7578        Main.map.mapView.removeMouseListener(this);
    7679        button.setSelected(false);
Note: See TracChangeset for help on using the changeset viewer.