jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] branch master updated: Bug 64142 - Avoid use of gray and disabled color for elements under TestFragment (#558)
Date Sat, 28 Mar 2020 18:37:42 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a97d7f  Bug 64142 - Avoid use of gray and disabled color for elements under TestFragment
(#558)
7a97d7f is described below

commit 7a97d7f4df320c7f9afacf5babe6c01d4310f89b
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Sat Mar 28 20:24:19 2020 +0300

    Bug 64142 - Avoid use of gray and disabled color for elements under TestFragment (#558)
---
 .../main/java/org/apache/jmeter/gui/tree/JMeterCellRenderer.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/tree/JMeterCellRenderer.java b/src/core/src/main/java/org/apache/jmeter/gui/tree/JMeterCellRenderer.java
index bce4ad4..55b3cbe 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/tree/JMeterCellRenderer.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/tree/JMeterCellRenderer.java
@@ -28,6 +28,7 @@ import javax.swing.tree.DefaultTreeCellRenderer;
 import javax.swing.tree.TreeNode;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.jmeter.control.TestFragmentController;
 import org.apache.jorphan.util.JOrphanUtils;
 
 /**
@@ -57,7 +58,13 @@ public class JMeterCellRenderer extends DefaultTreeCellRenderer {
         // one of its parents is in fact disabled.
         for (TreeNode parent = node.getParent(); parent != null && enabled; parent
= parent.getParent()) {
             if (parent instanceof JMeterTreeNode) {
-                enabled = ((JMeterTreeNode) parent).isEnabled();
+                JMeterTreeNode jMeterTreeNode = (JMeterTreeNode) parent;
+                if (jMeterTreeNode.getTestElement() instanceof TestFragmentController) {
+                    // TestFragment is always disabled, so we don't want to mark everything
below
+                    // with pale
+                    break;
+                }
+                enabled = jMeterTreeNode.isEnabled();
             }
         }
         ImageIcon ic = node.getIcon(enabled);


Mime
View raw message