Last change
on this file since 7269 was 7224, checked in by akks, 10 years ago |
see #3910: show lasso mode cursor immediately when entering the mode
|
File size:
1.0 KB
|
Line | |
---|
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 | import org.openstreetmap.josm.tools.ImageProvider;
|
---|
9 |
|
---|
10 | public class LassoModeAction extends MapMode {
|
---|
11 |
|
---|
12 | public LassoModeAction() {
|
---|
13 | super(tr("Lasso Mode"),
|
---|
14 | "rope",
|
---|
15 | tr("Lasso selection mode: select objects within a hand-drawn region"),
|
---|
16 | null,
|
---|
17 | ImageProvider.getCursor("normal", "rope"));
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void enterMode() {
|
---|
22 | if (Main.isDisplayingMapView()) {
|
---|
23 | Main.map.mapModeSelect.setLassoMode(true);
|
---|
24 | Main.map.mapModeSelect.enterMode();
|
---|
25 | }
|
---|
26 | super.enterMode();
|
---|
27 | }
|
---|
28 |
|
---|
29 | @Override
|
---|
30 | public void exitMode() {
|
---|
31 | if (Main.isDisplayingMapView()) {
|
---|
32 | Main.map.mapModeSelect.setLassoMode(false);
|
---|
33 | Main.map.mapModeSelect.exitMode();
|
---|
34 | }
|
---|
35 | super.exitMode();
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.