GT-3219: moved drop target assignment before setting background

This commit is contained in:
adamopolous
2019-10-07 13:01:57 -04:00
parent 04f7366a62
commit 4adece79a2

View File

@@ -48,6 +48,10 @@ public class GTreeRenderer extends DefaultTreeCellRenderer implements GComponent
super.getTreeCellRendererComponent(tree, value, selected1, expanded, leaf, row, hasFocus1);
// Important - make sure this happens before the setBackground() call, otherwise we will
// paint the previously dragged-over node as the drop target.
paintDropTarget = (value == dropTarget);
setOpaque(true);
setBackground(selected1 ? getBackgroundSelectionColor() : getBackgroundNonSelectionColor());
@@ -71,8 +75,6 @@ public class GTreeRenderer extends DefaultTreeCellRenderer implements GComponent
updateIconTextGap(icon, minIconWidth);
paintDropTarget = (value == dropTarget);
GTree gtree = node.getTree();
GTreeFilter filter = gtree == null ? null : gtree.getFilter();