Changeset 9365 in josm for trunk/src/org
- Timestamp:
- 2016-01-09T21:55:09+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r9264 r9365 25 25 import javax.swing.JComponent; 26 26 import javax.swing.JList; 27 import javax.swing.JMenuItem; 27 28 import javax.swing.JPanel; 28 29 import javax.swing.JPopupMenu; … … 34 35 35 36 import org.openstreetmap.josm.Main; 37 import org.openstreetmap.josm.actions.ExpertToggleAction; 36 38 import org.openstreetmap.josm.actions.relation.AddSelectionToRelations; 37 39 import org.openstreetmap.josm.actions.relation.DeleteRelationsAction; … … 86 88 * objects are visible on the map and can be selected there. Relations are not. 87 89 */ 88 public class RelationListDialog extends ToggleDialog implements DataSetListener, NavigatableComponent.ZoomChangeListener { 90 public class RelationListDialog extends ToggleDialog 91 implements DataSetListener, NavigatableComponent.ZoomChangeListener, ExpertToggleAction.ExpertModeChangeListener { 89 92 /** The display list. */ 90 93 private final JList<Relation> displaylist; … … 116 119 /** add all selected primitives to the given relations */ 117 120 private final AddSelectionToRelations addSelectionToRelations = new AddSelectionToRelations(); 121 private transient JMenuItem addSelectionToRelationMenuItem; 118 122 119 123 private final transient HighlightHelper highlightHelper = new HighlightHelper(); … … 212 216 DataSet.addSelectionListener(addSelectionToRelations); 213 217 dataChanged(null); 218 ExpertToggleAction.addExpertModeChangeListener(this); 219 expertChanged(ExpertToggleAction.isExpert()); 214 220 } 215 221 … … 220 226 DatasetEventManager.getInstance().removeDatasetListener(this); 221 227 DataSet.removeSelectionListener(addSelectionToRelations); 228 ExpertToggleAction.removeExpertModeChangeListener(this); 222 229 } 223 230 … … 595 602 popupMenuHandler.addAction(deleteRelationsAction).setVisible(false); 596 603 597 popupMenuHandler.addAction(addSelectionToRelations);604 addSelectionToRelationMenuItem = popupMenuHandler.addAction(addSelectionToRelations); 598 605 } 599 606 … … 682 689 } 683 690 } 691 692 @Override 693 public void expertChanged(boolean isExpert) { 694 addSelectionToRelationMenuItem.setVisible(isExpert); 695 } 684 696 }
Note:
See TracChangeset
for help on using the changeset viewer.