Changeset 18298 in josm
- Timestamp:
- 2021-10-31T20:55:53+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r18208 r18298 447 447 int numRelationDecisions = modelRelConflictResolver.getNumDecisions(); 448 448 449 450 449 if (numTagDecisions > 0 && numRelationDecisions > 0 && getHeight() > 0) { 451 450 // see #12536: Take the space for buttons and checkbox into account. 452 451 double hPopup = getHeight(); 453 double h1 = (pnlRelationMemberConflictResolver.getHeight() + pnlTagConflictResolver.getHeight());454 double correction = h1 > 0 ? ((hPopup-h1)/hPopup) : 0; 452 double h1 = pnlRelationMemberConflictResolver.getHeight() + pnlTagConflictResolver.getHeight(); 453 double correction = h1 > 0 && hPopup > h1 ? ((hPopup-h1)/hPopup) : 0; 455 454 456 455 double nTop = 3.5 + numTagDecisions; 457 456 double nBottom = 5.5 + numRelationDecisions; 458 spTagConflictTypes.setDividerLocation(nTop/(nTop+nBottom) - correction); 457 double ratio = nTop/(nTop+nBottom); 458 spTagConflictTypes.setDividerLocation(ratio > correction ? ratio - correction : ratio); 459 459 } 460 460 }
Note:
See TracChangeset
for help on using the changeset viewer.