- Timestamp:
- 2020-01-27T03:05:45+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r15455 r15786 121 121 122 122 /** 123 * Ask user to choose the target layer.124 * @param targetLayers list of candidate target layers.125 * @return the chosen layer126 * @deprecated to be removed127 */128 @Deprecated129 protected static Layer askTargetLayer(List<Layer> targetLayers) {130 return askTargetLayer(targetLayers, false, null, false, tr("Merge")).selectedTargetLayer;131 }132 133 /**134 * Ask user to choose the target layer and shows a checkbox.135 * @param targetLayers list of candidate target layers.136 * @param checkbox The text of the checkbox shown to the user.137 * @param checkboxDefault whether the checkbox is ticked by default138 * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox139 * @deprecated to be removed140 */141 @Deprecated142 protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, String checkbox, boolean checkboxDefault) {143 return askTargetLayer(targetLayers, true, checkbox, checkboxDefault, tr("Merge"));144 }145 146 /**147 123 * Ask user to choose the target layer and shows a checkbox. 148 124 * @param targetLayers list of candidate target layers. … … 154 130 * @since 15450 155 131 */ 156 protected static TargetLayerDialogResult<Layer> askTargetLayer(List< Layer> targetLayers, boolean showCheckbox,132 protected static TargetLayerDialogResult<Layer> askTargetLayer(List<? extends Layer> targetLayers, boolean showCheckbox, 157 133 String checkbox, boolean checkboxDefault, String buttonText) { 158 134 return askTargetLayer(targetLayers.toArray(new Layer[0]), -
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r15755 r15786 52 52 * @since 11885 (return type) 53 53 */ 54 protected Future<?> doMerge(List< Layer> targetLayers, final Collection<Layer> sourceLayers) {54 protected Future<?> doMerge(List<? extends Layer> targetLayers, final Collection<? extends Layer> sourceLayers) { 55 55 final boolean onlygpx = targetLayers.stream().noneMatch(l -> !(l instanceof GpxLayer)); 56 56 final TargetLayerDialogResult<Layer> res = askTargetLayer(targetLayers, onlygpx, … … 125 125 * @since 11885 (return type) 126 126 */ 127 public Future<?> merge(List< Layer> sourceLayers) {127 public Future<?> merge(List<? extends Layer> sourceLayers) { 128 128 return doMerge(sourceLayers, sourceLayers); 129 129 }
Note:
See TracChangeset
for help on using the changeset viewer.