Changeset 19138 in osm for applications/editors
- Timestamp:
- 2009-12-19T01:37:20+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/multipoly/src/multipoly
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/multipoly/src/multipoly/MultipolyAction.java
r18962 r19138 33 33 * New relation with type=multipolygon is created 34 34 * 35 * If one or more of ways is already in relation with type=multipolygon or the way os not closed,35 * If one or more of ways is already in relation with type=multipolygon or the way is not closed, 36 36 * then error is reported and no relation is created 37 37 * … … 49 49 Shortcut.registerShortcut("tools:multipoly", tr("Tool: {0}", tr("Create multipolygon")), 50 50 KeyEvent.VK_M, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 51 setEnabled(true);52 51 } 53 52 … … 144 143 } 145 144 145 /** Enable this action only if something is selected */ 146 @Override protected void updateEnabledState() { 147 if (getCurrentDataSet()==null) { 148 setEnabled(false); 149 } else { 150 updateEnabledState(getCurrentDataSet().getSelected()); 151 } 152 } 153 154 /** Enable this action only if something is selected */ 155 @Override protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 156 setEnabled(selection != null && !selection.isEmpty()); 157 } 158 146 159 } -
applications/editors/josm/plugins/multipoly/src/multipoly/MultipolyPlugin.java
r18079 r19138 35 35 toolsMenu.add(new JMenuItem(new MultipolyAction())); 36 36 } 37 37 38 38 } 39 39
Note:
See TracChangeset
for help on using the changeset viewer.