Last change
on this file since 6053 was 5460, checked in by Don-vip, 12 years ago |
global use of Main.isDisplayingMapView()
|
File size:
973 bytes
|
Rev | Line | |
---|
[5152] | 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 org.openstreetmap.josm.Main;
|
---|
| 7 | import org.openstreetmap.josm.actions.mapmode.MapMode;
|
---|
| 8 |
|
---|
| 9 | public class LassoModeAction extends MapMode {
|
---|
| 10 |
|
---|
| 11 | public LassoModeAction() {
|
---|
| 12 | super(tr("Lasso Mode"),
|
---|
| 13 | "rope",
|
---|
[5154] | 14 | tr("Lasso selection mode: select objects within a hand-drawn region"),
|
---|
[5152] | 15 | null,
|
---|
| 16 | null);
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | @Override
|
---|
| 20 | public void enterMode() {
|
---|
[5460] | 21 | if (Main.isDisplayingMapView()) {
|
---|
[5152] | 22 | Main.map.mapModeSelect.setLassoMode(true);
|
---|
| 23 | Main.map.mapModeSelect.enterMode();
|
---|
| 24 | }
|
---|
[5161] | 25 | super.enterMode();
|
---|
[5152] | 26 | }
|
---|
| 27 |
|
---|
| 28 | @Override
|
---|
| 29 | public void exitMode() {
|
---|
[5460] | 30 | if (Main.isDisplayingMapView()) {
|
---|
| 31 | Main.map.mapModeSelect.setLassoMode(false);
|
---|
| 32 | Main.map.mapModeSelect.exitMode();
|
---|
| 33 | }
|
---|
[5161] | 34 | super.exitMode();
|
---|
[5152] | 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.