Ticket #17654: 17654-v2.patch
File 17654-v2.patch, 1.0 KB (added by , 5 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 String msg = isSelected() 42 ? tr("Viewport following is enabled, press {0} to disable it", getShortcut().getKeyText()) 43 : tr("Viewport following is disabled"); 44 GuiHelper.runInEDT(() -> new Notification(msg).show()); 39 45 notifySelectedState(); 40 46 } 41 47