Changeset 9211 in josm
- Timestamp:
- 2015-12-29T14:37:40+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r9193 r9211 330 330 getContentPane().add(pnlButtons, BorderLayout.SOUTH); 331 331 validate(); 332 int numTagDecisions = getTagConflictResolverModel().getNumDecisions(); 333 int numRelationDecisions = getRelationMemberConflictResolverModel().getNumDecisions(); 334 if (numTagDecisions > 0 && numRelationDecisions > 0) { 335 spTagConflictTypes.setDividerLocation(0.5); 336 } 332 adjustDividerLocation(); 337 333 pnlRelationMemberConflictResolver.prepareForEditing(); 338 334 } … … 354 350 if (visible) { 355 351 prepareGUIBeforeConflictResolutionStarts(); 352 setMinimumSize(new Dimension(400, 400)); 356 353 new WindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, 357 354 new Dimension(800, 600))).applySafe(this); … … 411 408 } 412 409 410 private void adjustDividerLocation() { 411 int numTagDecisions = getTagConflictResolverModel().getNumDecisions(); 412 int numRelationDecisions = getRelationMemberConflictResolverModel().getNumDecisions(); 413 if (numTagDecisions > 0 && numRelationDecisions > 0) { 414 double nTop = 1.0 + numTagDecisions; 415 double nBottom = 2.5 + numRelationDecisions; 416 spTagConflictTypes.setDividerLocation(nTop/(nTop+nBottom)); 417 } 418 } 419 413 420 class AdjustDividerLocationAction extends WindowAdapter { 414 421 @Override 415 422 public void windowOpened(WindowEvent e) { 416 int numTagDecisions = getTagConflictResolverModel().getNumDecisions(); 417 int numRelationDecisions = getRelationMemberConflictResolverModel().getNumDecisions(); 418 if (numTagDecisions > 0 && numRelationDecisions > 0) { 419 spTagConflictTypes.setDividerLocation(0.5); 420 } 423 adjustDividerLocation(); 421 424 } 422 425 }
Note:
See TracChangeset
for help on using the changeset viewer.