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


Ignore:
Timestamp:
2015-10-19T16:19:21+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #11989 - middle click function broken (patch by michael2402)

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

Legend:

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

    r8900 r8907  
    350350        private MapFrame parent;
    351351
    352         private BlockingQueue<MouseState> incommingMouseState = new LinkedBlockingQueue<>();
     352        private final BlockingQueue<MouseState> incomingMouseState = new LinkedBlockingQueue<>();
    353353
    354354        private Point lastMousePos;
     
    367367                for (;;) {
    368368                    try {
    369                         final MouseState ms = incommingMouseState.take();
     369                        final MouseState ms = incomingMouseState.take();
    370370                        if (parent != Main.map)
    371371                            return; // exit, if new parent.
     
    651651         */
    652652        public synchronized void updateMousePosition(Point mousePos, int modifiers) {
    653             MouseState ms = new MouseState();
    654             if (mousePos == null) {
    655                 ms.mousePos = lastMousePos;
    656             } else {
     653            if (mousePos != null) {
    657654                lastMousePos = mousePos;
    658655            }
     656            MouseState ms = new MouseState(lastMousePos, modifiers);
    659657            // remove mouse states that are in the queue. Our mouse state is newer.
    660             incommingMouseState.clear();
    661             incommingMouseState.offer(ms);
     658            incomingMouseState.clear();
     659            incomingMouseState.offer(ms);
    662660        }
    663661    }
     
    667665     * @author imi
    668666     */
    669     static class MouseState {
    670         private Point mousePos;
    671         private int modifiers;
     667    private static class MouseState {
     668        private final Point mousePos;
     669        private final int modifiers;
     670
     671        MouseState(Point mousePos, int modifiers) {
     672            this.mousePos = mousePos;
     673            this.modifiers = modifiers;
     674        }
    672675    }
    673676
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableMemberCellRenderer.java

    r8903 r8907  
    1616public class MemberTableMemberCellRenderer extends MemberTableCellRenderer {
    1717
    18         /**
    19         * Constructs a new {@code MemberTableMemberCellRenderer}.
    20         */
     18    /**
     19    * Constructs a new {@code MemberTableMemberCellRenderer}.
     20    */
    2121    public MemberTableMemberCellRenderer() {
    2222        super();
Note: See TracChangeset for help on using the changeset viewer.