Changeset 15450 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-10-10T21:35:19+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r14341 r15450 124 124 * @param targetLayers list of candidate target layers. 125 125 * @return the chosen layer 126 */ 126 * @deprecated 127 */ 128 @Deprecated 127 129 protected static Layer askTargetLayer(List<Layer> targetLayers) { 128 return askTargetLayer(targetLayers, false, null, false ).selectedTargetLayer;130 return askTargetLayer(targetLayers, false, null, false, tr("Merge")).selectedTargetLayer; 129 131 } 130 132 … … 135 137 * @param checkboxDefault whether the checkbox is ticked by default 136 138 * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox 137 */ 139 * @deprecated 140 */ 141 @Deprecated 138 142 protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, String checkbox, boolean checkboxDefault) { 139 return askTargetLayer(targetLayers, true, checkbox, checkboxDefault );143 return askTargetLayer(targetLayers, true, checkbox, checkboxDefault, tr("Merge")); 140 144 } 141 145 … … 146 150 * @param checkbox The text of the checkbox shown to the user. 147 151 * @param checkboxDefault whether the checkbox is ticked by default 152 * @param buttonText text of button used to select target layer 148 153 * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox 154 * @since 15450 149 155 */ 150 156 protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, boolean showCheckbox, 151 String checkbox, boolean checkboxDefault ) {157 String checkbox, boolean checkboxDefault, String buttonText) { 152 158 return askTargetLayer(targetLayers.toArray(new Layer[0]), 153 159 tr("Please select the target layer."), checkbox, 154 160 tr("Select target layer"), 155 tr("Merge"), "dialogs/mergedown", showCheckbox, checkboxDefault);161 buttonText, "dialogs/mergedown", showCheckbox, checkboxDefault); 156 162 } 157 163 -
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r14397 r15450 55 55 final TargetLayerDialogResult<Layer> res = askTargetLayer(targetLayers, onlygpx, 56 56 tr("Cut timewise overlapping parts of tracks"), 57 onlygpx && Config.getPref().getBoolean("mergelayer.gpx.cut", false) );57 onlygpx && Config.getPref().getBoolean("mergelayer.gpx.cut", false), tr("Merge layer")); 58 58 final Layer targetLayer = res.selectedTargetLayer; 59 59 if (targetLayer == null) -
trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java
r14397 r15450 48 48 return; 49 49 } 50 Layer targetLayer = askTargetLayer(targetLayers );50 Layer targetLayer = askTargetLayer(targetLayers, false, null, false, tr("Merge selection")).selectedTargetLayer; 51 51 if (targetLayer == null) 52 52 return;
Note:
See TracChangeset
for help on using the changeset viewer.