Changeset 13143 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2017-11-22T02:27:11+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #13883 - statusbar is not updated when the map is moved with keyboard (ctrl + arrow keys)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r13126 r13143  
    910910    }
    911911
     912    @Override
     913    protected void refreshMouse() {
     914        if (lastMEvent.getWhen() > 0) {
     915            // This fake movement allows to keep consistent state between mouse position and hilighted primitives, status bar, etc.
     916            // When the map is not moved by mouse (for example with keyboard shortcuts)
     917            dispatchEvent(new MouseEvent(this, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0,
     918                    lastMEvent.getX(), lastMEvent.getY(), 0, false));
     919        }
     920    }
     921
    912922    /**
    913923     * Returns the layer manager.
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r12846 r13143  
    697697        if (!initial) {
    698698            repaint();
     699            refreshMouse();
    699700            fireZoomChanged();
    700701        }
     702    }
     703
     704    protected void refreshMouse() {
     705        // To be overriden by subclasses handling mouse events
    701706    }
    702707
Note: See TracChangeset for help on using the changeset viewer.