- Timestamp:
- 2016-01-28T09:29:14+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java
r9659 r9661 14 14 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 15 15 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 16 import org.openstreetmap.josm.gui.dialogs.relation. GenericRelationEditor;16 import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor; 17 17 import org.openstreetmap.josm.gui.dialogs.relation.MemberTable; 18 18 import org.openstreetmap.josm.gui.dialogs.relation.MemberTableModel; 19 import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;20 19 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 21 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener; … … 47 46 putValue(SMALL_ICON, ImageProvider.get("dialogs/refresh")); 48 47 putValue(NAME, tr("Refresh")); 49 getEditor().getRootPane().getActionMap().put("refresh", this); 50 getEditor().getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), "refresh"); 48 if (editor instanceof JComponent) { 49 ((JComponent) editor).getRootPane().getActionMap().put("refresh", this); 50 ((JComponent) editor).getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), "refresh"); 51 } 51 52 Main.main.undoRedo.addCommandQueueListener(this); 52 53 updateEnabledState(); 53 }54 55 private GenericRelationEditor getEditor() {56 return (GenericRelationEditor) editor;57 54 } 58 55 … … 70 67 if (isEditorDirty() && confirmDiscardDirtyData() != 0) 71 68 return; 72 getEditor().reloadDataFromRelation();69 editor.reloadDataFromRelation(); 73 70 } 74 71
Note:
See TracChangeset
for help on using the changeset viewer.