Changeset 5053 in josm for trunk


Ignore:
Timestamp:
2012-03-08T10:31:34+01:00 (8 years ago)
Author:
akks
Message:

style fix, removed one patch committed by mistake

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r5050 r5053  
    1212import java.awt.BasicStroke;
    1313import java.awt.Color;
    14 import java.awt.Component;
    1514import java.awt.Cursor;
    1615import java.awt.Graphics2D;
    17 import java.awt.KeyboardFocusManager;
    1816import java.awt.MenuItem;
    1917import java.awt.Point;
     
    3937import java.util.Map;
    4038import java.util.Set;
    41 
    4239import java.util.TreeSet;
    43 import javax.swing.*;
     40import javax.swing.AbstractAction;
     41import javax.swing.JOptionPane;
     42import javax.swing.JPopupMenu;
     43import javax.swing.Timer;
     44
    4445import org.openstreetmap.josm.Main;
    4546import org.openstreetmap.josm.actions.JosmAction;
     
    222223            return;
    223224        if (event instanceof KeyEvent) {
    224             Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    225             Component wantedFocus = Main.map.mapView.getParent();
    226             boolean foundMapViewAncestor=false;
    227             while (focused!=null) {
    228                 if (focused==wantedFocus) {
    229                     foundMapViewAncestor=true;
    230                 }
    231                 focused = focused.getParent();
    232             }
    233             // we accept only events that come from map or toggle dialogs, not from menu and dialogs
    234             if (!foundMapViewAncestor) return;
    235225            processKeyEvent((KeyEvent) event);
    236226        } //  toggle angle snapping
     
    247237    private Timer timer;
    248238    void processKeyEvent(KeyEvent e) {
    249         if (!snappingShortcut.isEvent(e) && !getShortcut().isEvent(e))
     239        if (!snappingShortcut.isEvent(e))
    250240            return;
    251241
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r5050 r5053  
    22package org.openstreetmap.josm.gui.history;
    33
    4 import java.awt.*;
     4import java.awt.BorderLayout;
     5import java.awt.GridBagConstraints;
     6import java.awt.GridBagLayout;
     7import java.awt.GridLayout;
     8
    59import static org.openstreetmap.josm.tools.I18n.tr;
    610
Note: See TracChangeset for help on using the changeset viewer.