Ticket #17654: 17654-v3.patch
| File 17654-v3.patch, 1.1 KB (added by , 6 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java
8 8 import java.awt.event.KeyEvent; 9 9 10 10 import org.openstreetmap.josm.actions.mapmode.DrawAction; 11 import org.openstreetmap.josm.gui.Notification; 12 import org.openstreetmap.josm.gui.util.GuiHelper; 11 13 import org.openstreetmap.josm.tools.Shortcut; 12 14 13 15 /** … … 36 38 public void actionPerformed(ActionEvent e) { 37 39 toggleSelectedState(e); 38 40 DrawAction.VIEWPORT_FOLLOWING.put(isSelected()); 41 if (!getShortcut().getKeyText().isEmpty()) { 42 String msg = isSelected() 43 ? tr("Viewport following is enabled, press {0} to disable it", getShortcut().getKeyText()) 44 : tr("Viewport following is disabled"); 45 GuiHelper.runInEDT(() -> new Notification(msg).show()); 46 } 39 47 notifySelectedState(); 40 48 } 41 49
