Tree: fixed wide selection if scrolled horizontally

This commit is contained in:
Karl Tauber
2019-12-31 09:49:56 +01:00
parent b6fb06bc65
commit 452452dcc9
4 changed files with 88 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ public class FlatTreeUI
g.setColor( isDropRow
? UIManager.getColor( "Tree.dropCellBackground" )
: (hasFocus ? selectionBackground : selectionInactiveBackground) );
g.fillRect( 0, bounds.y, clipBounds.width, bounds.height );
g.fillRect( 0, bounds.y, tree.getWidth(), bounds.height );
// paint expand/collapse icon
if( shouldPaintExpandControl( path, row, isExpanded, hasBeenExpanded, isLeaf ) ) {