Changeset 5726 in josm
- Timestamp:
- 2013-02-18T09:37:18+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r5656 r5726 170 170 private final DataSetListenerAdapter dataChangedAdapter = new DataSetListenerAdapter(this); 171 171 private final HelpAction helpAction = new HelpAction(); 172 private final PasteValueAction pasteValueAction = new PasteValueAction(); 172 173 private final CopyValueAction copyValueAction = new CopyValueAction(); 173 174 private final CopyKeyValueAction copyKeyValueAction = new CopyKeyValueAction(); … … 325 326 // setting up the properties table 326 327 propertyMenu = new JPopupMenu(); 328 propertyMenu.add(pasteValueAction); 327 329 propertyMenu.add(copyValueAction); 328 330 propertyMenu.add(copyKeyValueAction); … … 1126 1128 } 1127 1129 } 1130 1131 class PasteValueAction extends AbstractAction { 1132 public PasteValueAction() { 1133 putValue(NAME, tr("Paste Value")); 1134 putValue(SHORT_DESCRIPTION, tr("Paste the value of the selected tag from clipboard")); 1135 } 1136 1137 @Override 1138 public void actionPerformed(ActionEvent ae) { 1139 if (propertyTable.getSelectedRowCount() != 1) 1140 return; 1141 String key = propertyData.getValueAt(propertyTable.getSelectedRow(), 0).toString(); 1142 Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected(); 1143 String value = Utils.getClipboardContent().trim(); 1144 if (sel.isEmpty()) 1145 return; 1146 Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, value)); 1147 } 1148 } 1128 1149 1129 1150 abstract class AbstractCopyAction extends AbstractAction {
Note:
See TracChangeset
for help on using the changeset viewer.