Changeset 18793 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2023-08-07T19:39:39+02:00 (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r18413 r18793 124 124 private final TagEditorPanel tagEditorPanel; 125 125 private final ReferringRelationsBrowser referrerBrowser; 126 private final ReferringRelationsBrowserModel referrerModel;127 126 128 127 /** the member table and its model */ … … 154 153 private final SelectAction selectAction; 155 154 /** 156 * Action for performing the {@link DuplicateRelationAction}157 */158 private final DuplicateRelationAction duplicateAction;159 /**160 * Action for performing the {@link DeleteCurrentRelationAction}161 */162 private final DeleteCurrentRelationAction deleteAction;163 /**164 * Action for performing the {@link OKAction}165 */166 private final OKAction okAction;167 /**168 155 * Action for performing the {@link CancelAction} 169 156 */ … … 175 162 176 163 private Component selectedTabPane; 177 private JTabbedPane tabbedPane;164 private final JTabbedPane tabbedPane; 178 165 179 166 /** 180 167 * Creates a new relation editor for the given relation. The relation will be saved if the user 181 168 * selects "ok" in the editor. 182 * 169 * <p> 183 170 * If no relation is given, will create an editor for a new relation. 184 171 * … … 202 189 @Override 203 190 public Collection<OsmPrimitive> getSelection() { 204 Relation relation = new Relation(); 205 tagEditorPanel.getModel().applyToPrimitive(relation); 206 return Collections.<OsmPrimitive>singletonList(relation); 191 return Collections.singletonList(getRelation()); 207 192 } 208 193 }; … … 214 199 selectionTableModel = new SelectionTableModel(getLayer()); 215 200 selectionTableModel.register(); 216 referrerModel = new ReferringRelationsBrowserModel(relation);201 ReferringRelationsBrowserModel referrerModel = new ReferringRelationsBrowserModel(relation); 217 202 218 203 tagEditorPanel = new TagEditorPanel(relation, presetHandler); … … 271 256 applyAction = new ApplyAction(actionAccess); 272 257 selectAction = new SelectAction(actionAccess); 273 duplicateAction = new DuplicateRelationAction(actionAccess); 274 deleteAction = new DeleteCurrentRelationAction(actionAccess); 258 // Action for performing the {@link DuplicateRelationAction} 259 final DuplicateRelationAction duplicateAction = new DuplicateRelationAction(actionAccess); 260 // Action for performing the {@link DeleteCurrentRelationAction} 261 final DeleteCurrentRelationAction deleteAction = new DeleteCurrentRelationAction(actionAccess); 275 262 276 263 this.memberTableModel.addTableModelListener(applyAction); … … 279 266 addPropertyChangeListener(deleteAction); 280 267 281 okAction = new OKAction(actionAccess); 268 // Action for performing the {@link OKAction} 269 final OKAction okAction = new OKAction(actionAccess); 282 270 cancelAction = new CancelAction(actionAccess); 283 271 … … 518 506 * @return the panel for the relation member editor 519 507 */ 520 protectedstatic JPanel buildMemberEditorPanel(508 static JPanel buildMemberEditorPanel( 521 509 LeftButtonToolbar leftButtonToolbar, IRelationEditorActionAccess editorAccess) { 522 510 final JPanel pnl = new JPanel(new GridBagLayout());
Note:
See TracChangeset
for help on using the changeset viewer.