Changeset 16189 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-03-21T22:44:38+01:00 (5 years ago)
Author:
simon04
Message:

fix #18692 - Show Duplicate relation in context menu

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r16067 r16189  
    5454import org.openstreetmap.josm.actions.JosmAction;
    5555import org.openstreetmap.josm.actions.relation.DeleteRelationsAction;
     56import org.openstreetmap.josm.actions.relation.DuplicateRelationAction;
    5657import org.openstreetmap.josm.actions.relation.EditRelationAction;
    5758import org.openstreetmap.josm.command.ChangeCommand;
     
    392393            membershipMenu.addSeparator();
    393394        }
    394         RelationPopupMenus.setupHandler(membershipMenuHandler, EditRelationAction.class, DeleteRelationsAction.class);
     395        RelationPopupMenus.setupHandler(membershipMenuHandler,
     396                EditRelationAction.class, DuplicateRelationAction.class, DeleteRelationsAction.class);
    395397        membershipMenu.addSeparator();
    396398        membershipMenu.add(helpRelAction);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r15811 r16189  
    4141import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    4242import org.openstreetmap.josm.gui.PopupMenuHandler;
     43import org.openstreetmap.josm.gui.dialogs.relation.actions.DuplicateRelationAction;
    4344import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4445import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    9394        final JPopupMenu popupMenu = new JPopupMenu();
    9495        final PopupMenuHandler popupMenuHandler = new PopupMenuHandler(popupMenu);
    95         RelationPopupMenus.setupHandler(popupMenuHandler);
     96        RelationPopupMenus.setupHandler(popupMenuHandler, DuplicateRelationAction.class);
    9697
    9798        add(buildButtonPanel(), BorderLayout.SOUTH);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationPopupMenus.java

    r14685 r16189  
    1010import org.openstreetmap.josm.actions.relation.DownloadMembersAction;
    1111import org.openstreetmap.josm.actions.relation.DownloadSelectedIncompleteMembersAction;
     12import org.openstreetmap.josm.actions.relation.DuplicateRelationAction;
    1213import org.openstreetmap.josm.actions.relation.EditRelationAction;
    1314import org.openstreetmap.josm.actions.relation.SelectInRelationListAction;
     
    3839        }
    3940
     41        if (!exclude.contains(DuplicateRelationAction.class)) {
     42            menu.addAction(new DuplicateRelationAction());
     43        }
     44
    4045        if (!exclude.contains(DeleteRelationsAction.class)) {
    4146            menu.addAction(new DeleteRelationsAction());
Note: See TracChangeset for help on using the changeset viewer.