jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1470027 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java xdocs/changes.xml
Date Fri, 19 Apr 2013 20:31:01 GMT
Author: pmouawad
Date: Fri Apr 19 20:31:01 2013
New Revision: 1470027

URL: http://svn.apache.org/r1470027
Log:
Bug 54870 - Tree D&D may lost leaf nodes
Bugzilla Id: 54870

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java?rev=1470027&r1=1470026&r2=1470027&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeTransferHandler.java Fri Apr
19 20:31:01 2013
@@ -247,12 +247,18 @@ public class JMeterTreeTransferHandler e
             // working on the original node would be harder as 
             //    you'll have to deal with the insertion index offset if you re-order a node
inside a parent
             JMeterTreeNode copy = (JMeterTreeNode) nodes[i].clone();
+            
+            // first copy the children as the call to copy.add will modify the collection
we're iterating on
             Enumeration<?> enumFrom = nodes[i].children();
+            List<JMeterTreeNode> tmp = new ArrayList<JMeterTreeNode>();
             while (enumFrom.hasMoreElements()) {
                 JMeterTreeNode child = (JMeterTreeNode) enumFrom.nextElement();
-                copy.add(child);
+                tmp.add(child);
             }
             
+            for (JMeterTreeNode jMeterTreeNode : tmp) {
+                copy.add(jMeterTreeNode);
+            }
             guiInstance.getTreeModel().insertNodeInto(copy, target, index++);
             nodesForRemoval.add(nodes[i]);
         }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1470027&r1=1470026&r2=1470027&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Apr 19 20:31:01 2013
@@ -141,6 +141,7 @@ It was therefore necessary to change the
 <li><bugzilla>54504</bugzilla> - Resource string not found: [clipboard_node_read_error]</li>
 <li><bugzilla>54538</bugzilla> - GUI: context menu is too big</li>
 <li><bugzilla>54847</bugzilla> - Cut &amp; Paste is broken with tree
multi-selection</li>
+<li><bugzilla>54870</bugzilla> - Tree D&D may lost leaf nodes (affected
nightly build)</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message