Changeset 5050 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2012-03-08T10:04:21+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r4982 r5050 71 71 info.add(GBC.glue(0,10), GBC.eol()); 72 72 info.add(new JLabel(tr("Homepage")), GBC.std().insets(10,0,10,0)); 73 info.add(new UrlLabel("http://josm.openstreetmap.de"), GBC.eol().fill(GBC.HORIZONTAL)); 73 info.add(new UrlLabel("http://josm.openstreetmap.de",2), GBC.eol().fill(GBC.HORIZONTAL)); 74 info.add(GBC.glue(0,5), GBC.eol()); 74 75 info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0)); 75 info.add(new UrlLabel("http://josm.openstreetmap.de/newticket" ), GBC.eol().fill(GBC.HORIZONTAL));76 info.add(new UrlLabel("http://josm.openstreetmap.de/newticket",2), GBC.eol().fill(GBC.HORIZONTAL)); 76 77 77 78 JTextArea revision = new JTextArea(); -
trunk/src/org/openstreetmap/josm/actions/Map_Rectifier_WMSmenuAction.java
r4973 r5050 137 137 if(!s.url.equals("")) { 138 138 panel.add(serviceBtn, GBC.std()); 139 panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST) );139 panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST), 2); 140 140 } else { 141 141 panel.add(serviceBtn, GBC.eol().anchor(GridBagConstraints.WEST)); -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r4982 r5050 12 12 import java.awt.BasicStroke; 13 13 import java.awt.Color; 14 import java.awt.Component; 14 15 import java.awt.Cursor; 15 16 import java.awt.Graphics2D; 17 import java.awt.KeyboardFocusManager; 16 18 import java.awt.MenuItem; 17 19 import java.awt.Point; … … 39 41 40 42 import java.util.TreeSet; 41 import javax.swing.AbstractAction; 42 import javax.swing.JOptionPane; 43 44 import javax.swing.JPopupMenu; 45 import javax.swing.Timer; 43 import javax.swing.*; 46 44 import org.openstreetmap.josm.Main; 47 45 import org.openstreetmap.josm.actions.JosmAction; … … 224 222 return; 225 223 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; 226 235 processKeyEvent((KeyEvent) event); 227 236 } // toggle angle snapping … … 238 247 private Timer timer; 239 248 void processKeyEvent(KeyEvent e) { 240 if (!snappingShortcut.isEvent(e) )249 if (!snappingShortcut.isEvent(e) && !getShortcut().isEvent(e)) 241 250 return; 242 251 … … 261 270 262 271 private void doKeyPressEvent(KeyEvent e) { 263 if (!snappingShortcut.isEvent(e))264 return;265 272 snapHelper.setFixedMode(); 266 273 computeHelperLine(); … … 268 275 } 269 276 private void doKeyReleaseEvent(KeyEvent e) { 270 if (!snappingShortcut.isEvent(e))271 return;272 277 snapHelper.unFixOrTurnOff(); 273 278 computeHelperLine();
Note:
See TracChangeset
for help on using the changeset viewer.