Last change
on this file since 7665 was 5025, checked in by Don-vip, 12 years ago |
see #4043 - Have an 'upload prohibited' flag in .osm files
|
File size:
788 bytes
|
Rev | Line | |
---|
[5025] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.actions;
|
---|
| 3 |
|
---|
| 4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
| 5 |
|
---|
| 6 | import java.awt.event.ActionEvent;
|
---|
| 7 |
|
---|
| 8 | import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
|
---|
| 9 | import org.openstreetmap.josm.gui.layer.OsmDataLayer;
|
---|
| 10 |
|
---|
| 11 | public class ToggleUploadDiscouragedLayerAction extends JosmAction {
|
---|
| 12 |
|
---|
| 13 | private OsmDataLayer layer;
|
---|
| 14 |
|
---|
| 15 | public ToggleUploadDiscouragedLayerAction(OsmDataLayer layer) {
|
---|
| 16 | super(tr("Encourage/discourage upload"), null, null, null, false);
|
---|
| 17 | this.layer = layer;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | @Override
|
---|
| 21 | public void actionPerformed(ActionEvent e) {
|
---|
| 22 | layer.setUploadDiscouraged(!layer.isUploadDiscouraged());
|
---|
| 23 | LayerListDialog.getInstance().repaint();
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.