Last change
on this file since 13664 was 13130, checked in by Don-vip, 6 years ago |
fix #15572 - use ImageProvider attach API for all JOSM actions to ensure proper icon size everywhere
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions.relation;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.gui.MainApplication;
|
---|
9 | import org.openstreetmap.josm.gui.MapFrame;
|
---|
10 | import org.openstreetmap.josm.tools.ImageProvider;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * The action for activating a relation in relation list dialog
|
---|
14 | * @since 5793
|
---|
15 | */
|
---|
16 | public class SelectInRelationListAction extends AbstractRelationAction {
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Constructs a new <code>SelectInRelationListAction</code>.
|
---|
20 | */
|
---|
21 | public SelectInRelationListAction() {
|
---|
22 | putValue(NAME, tr("Select in relation list"));
|
---|
23 | putValue(SHORT_DESCRIPTION, tr("Select relation in relation list."));
|
---|
24 | new ImageProvider("dialogs", "selectionlist").getResource().attachImageIcon(this, true);
|
---|
25 | }
|
---|
26 |
|
---|
27 | @Override
|
---|
28 | public void actionPerformed(ActionEvent e) {
|
---|
29 | MapFrame map = MainApplication.getMap();
|
---|
30 | if (!isEnabled() || relations.isEmpty() || map == null || map.relationListDialog == null) return;
|
---|
31 | map.relationListDialog.unfurlDialog();
|
---|
32 | map.relationListDialog.selectRelations(relations);
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.