Changeset 15708 in josm


Ignore:
Timestamp:
2020-01-14T08:56:32+01:00 (4 years ago)
Author:
stoecker
Message:

see #17654 - allow to disable notification

File:
1 edited

Legend:

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

    r15705 r15708  
    99
    1010import org.openstreetmap.josm.actions.mapmode.DrawAction;
     11import org.openstreetmap.josm.data.preferences.BooleanProperty;
    1112import org.openstreetmap.josm.gui.Notification;
    1213import org.openstreetmap.josm.gui.util.GuiHelper;
     
    1819 */
    1920public class ViewportFollowToggleAction extends ToggleAction {
     21
     22    /**
     23     * Defines if a notification should be displayed after enabling and disabling
     24     */
     25    public static final BooleanProperty PROP_NOTIFICATION = new BooleanProperty("viewportfollow.notification", true);
    2026
    2127    /**
     
    3945        toggleSelectedState(e);
    4046        DrawAction.VIEWPORT_FOLLOWING.put(isSelected());
    41         if (!getShortcut().getKeyText().isEmpty()) {
     47        if (!getShortcut().getKeyText().isEmpty() && PROP_NOTIFICATION.get()) {
    4248            String msg = isSelected()
    4349                    ? tr("Viewport following is enabled, press {0} to disable it", getShortcut().getKeyText())
Note: See TracChangeset for help on using the changeset viewer.