From 1b11b4ebc9a5a021576d4b859cebefe6b9366661 Mon Sep 17 00:00:00 2001 From: weisj Date: Fri, 10 Jul 2020 19:55:39 +0200 Subject: [PATCH] Only repaint if tree lines are enabled. --- .../weisj/darklaf/components/treetable/JTreeTable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/components/treetable/JTreeTable.java b/core/src/main/java/com/github/weisj/darklaf/components/treetable/JTreeTable.java index 28a7a5c2..7a41eada 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/treetable/JTreeTable.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/treetable/JTreeTable.java @@ -38,6 +38,7 @@ import com.github.weisj.darklaf.components.treetable.model.TreeTableModel; import com.github.weisj.darklaf.ui.cell.hint.CellHintPopupListener; import com.github.weisj.darklaf.ui.tree.DarkTreeUI; import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.PropertyUtil; public class JTreeTable extends JTable implements TreeSelectionListener { @@ -101,6 +102,8 @@ public class JTreeTable extends JTable implements TreeSelectionListener { @Override public void valueChanged(final TreeSelectionEvent e) { - repaint(0, 0, getColumnModel().getColumn(0).getWidth(), getHeight()); + if (!DarkTreeUI.STYLE_NONE.equals(PropertyUtil.getString(tree, DarkTreeUI.KEY_LINE_STYLE, ""))) { + repaint(0, 0, getColumnModel().getColumn(0).getWidth(), getHeight()); + } } }