Changeset 8974 in josm
- Timestamp:
- 2015-11-02T09:00:53+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r8947 r8974 79 79 * merged to, see {@link #setTargetPrimitive(OsmPrimitive)}. 80 80 * 81 * After the dialog is closed use {@link #is Canceled()} to check whether the user canceled82 * the dialog. If it wasn't canceled you may build a collection of {@link Command} objects81 * After the dialog is closed use {@link #isApplied()} to check whether the dialog has been 82 * applied. If it was applied you may build a collection of {@link Command} objects 83 83 * which reflect the conflict resolution decisions the user made in the dialog: 84 84 * see {@link #buildResolutionCommands()} … … 110 110 private TagConflictResolver pnlTagConflictResolver; 111 111 protected RelationMemberConflictResolver pnlRelationMemberConflictResolver; 112 private boolean canceled;112 private boolean applied; 113 113 private JPanel pnlButtons; 114 114 protected transient OsmPrimitive targetPrimitive; … … 338 338 } 339 339 340 protected void set Canceled(boolean canceled) {341 this. canceled = canceled;342 } 343 344 /** 345 * Determines if this dialog has been c ancelled.346 * @return true if this dialog has been c ancelled, false otherwise.347 */ 348 public boolean is Canceled() {349 return canceled;340 protected void setApplied(boolean applied) { 341 this.applied = applied; 342 } 343 344 /** 345 * Determines if this dialog has been closed with "Apply". 346 * @return true if this dialog has been closed with "Apply", false otherwise. 347 */ 348 public boolean isApplied() { 349 return applied; 350 350 } 351 351 … … 356 356 new WindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, 357 357 new Dimension(600, 400))).applySafe(this); 358 set Canceled(false);358 setApplied(false); 359 359 btnApply.requestFocusInWindow(); 360 360 } else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775 … … 375 375 @Override 376 376 public void actionPerformed(ActionEvent arg0) { 377 setCanceled(true);378 377 setVisible(false); 379 378 } … … 391 390 @Override 392 391 public void actionPerformed(ActionEvent arg0) { 392 setApplied(true); 393 393 setVisible(false); 394 394 pnlTagConflictResolver.rememberPreferences(); … … 515 515 if (!dialog.isResolvedCompletely()) { 516 516 dialog.setVisible(true); 517 if ( dialog.isCanceled()) {517 if (!dialog.isApplied()) { 518 518 throw new UserCancelException(); 519 519 }
Note:
See TracChangeset
for help on using the changeset viewer.