- Timestamp:
- 2017-10-08T03:29:55+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r12678 r12940 519 519 } 520 520 } else if (!GraphicsEnvironment.isHeadless()) { 521 // Build conflict resolution dialog 522 final CombinePrimitiveResolverDialog dialog = new CombinePrimitiveResolverDialog(Main.parent, tagModel, relModel); 523 524 // Ensure a proper title is displayed instead of a previous target (fix #7925) 525 if (targetPrimitives.size() == 1) { 526 dialog.setTargetPrimitive(targetPrimitives.iterator().next(), false); 527 } else { 528 dialog.setTargetPrimitive(null, false); 529 } 530 531 // Resolve tag conflicts 532 GuiHelper.runInEDTAndWait(() -> { 533 tagModel.fireTableDataChanged(); 534 relModel.fireTableDataChanged(); 535 dialog.updateTitle(); 521 UserCancelException canceled = GuiHelper.runInEDTAndWaitAndReturn(() -> { 522 // Build conflict resolution dialog 523 final CombinePrimitiveResolverDialog dialog = new CombinePrimitiveResolverDialog(Main.parent, tagModel, relModel); 524 525 // Ensure a proper title is displayed instead of a previous target (fix #7925) 526 if (targetPrimitives.size() == 1) { 527 dialog.setTargetPrimitive(targetPrimitives.iterator().next(), false); 528 } else { 529 dialog.setTargetPrimitive(null, false); 530 } 531 532 // Resolve tag conflicts 533 GuiHelper.runInEDTAndWait(() -> { 534 tagModel.fireTableDataChanged(); 535 relModel.fireTableDataChanged(); 536 dialog.updateTitle(); 537 }); 538 dialog.setVisible(true); 539 if (!dialog.isApplied()) { 540 return new UserCancelException(); 541 } 542 543 // Build commands 544 for (OsmPrimitive i : targetPrimitives) { 545 dialog.setTargetPrimitive(i, false); 546 cmds.addAll(dialog.buildResolutionCommands()); 547 } 548 return null; 536 549 }); 537 dialog.setVisible(true); 538 if (!dialog.isApplied()) { 539 throw new UserCancelException(); 540 } 541 542 // Build commands 543 for (OsmPrimitive i : targetPrimitives) { 544 dialog.setTargetPrimitive(i, false); 545 cmds.addAll(dialog.buildResolutionCommands()); 550 if (canceled != null) { 551 throw canceled; 546 552 } 547 553 }
Note:
See TracChangeset
for help on using the changeset viewer.