Ticket #23555: 23305-new-button.patch
File 23305-new-button.patch, 1.6 KB (added by , 2 months ago) |
---|
-
src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
240 240 CancelAction cancelAction = new CancelAction(); 241 241 pnl.add(new JButton(cancelAction)); 242 242 243 if (Config.getPref().getBoolean("combine-conflict-precise", true)) { 244 // -- accept single button 245 pnl.add(new JButton(new AcceptSimpleAction())); 246 } 247 243 248 // -- help button 244 249 helpAction = new ContextSensitiveHelpAction(); 245 250 pnl.add(new JButton(helpAction)); … … 444 449 } 445 450 } 446 451 452 protected class AcceptSimpleAction extends AbstractAction { 453 /** 454 * Constructs a new {@code AcceptSingleAction}. 455 */ 456 public AcceptSimpleAction() { 457 putValue(Action.SHORT_DESCRIPTION, tr("Accept all tag keys with only one value")); 458 putValue(Action.NAME, tr("Accept simple")); 459 new ImageProvider("apply").getResource().attachImageIcon(this); 460 } 461 462 @Override 463 public void actionPerformed(ActionEvent arg0) { 464 prepareDefaultDecisions(true); 465 } 466 } 467 447 468 private void adjustDividerLocation() { 448 469 int numTagDecisions = modelTagConflictResolver.getNumDecisions(); 449 470 int numRelationDecisions = modelRelConflictResolver.getNumDecisions();