You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/11/19 23:28:27 UTC

svn commit: r1411460 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java xdocs/changes.xml

Author: pmouawad
Date: Mon Nov 19 22:28:27 2012
New Revision: 1411460

URL: http://svn.apache.org/viewvc?rev=1411460&view=rev
Log:
Bug 54172 - Duplicate shortcut key not working and CTRL+C / CTRL+V / CTRL+V do not cancel default event
Bugzilla Id: 54172

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java?rev=1411460&r1=1411459&r2=1411460&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java Mon Nov 19 22:28:27 2012
@@ -284,18 +284,19 @@ public class JMeterTreeListener implemen
         if (KeyStrokes.matches(e,KeyStrokes.COPY)) {
             ActionRouter actionRouter = ActionRouter.getInstance();
             actionRouter.doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.COPY));
+            e.consume();
         } else if (KeyStrokes.matches(e,KeyStrokes.PASTE)) {
             ActionRouter actionRouter = ActionRouter.getInstance();
             actionRouter.doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.PASTE));
+            e.consume();
         } else if (KeyStrokes.matches(e,KeyStrokes.CUT)) {
             ActionRouter actionRouter = ActionRouter.getInstance();
             actionRouter.doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.CUT));
-// If the following lines are included, then pressing the DUPLICATE key results in calling the action twice.
-// Without the code below, it still works.
-// Odd, the other keypresses do need to be handled above or they do not work at all...
-//        } else if (KeyStrokes.matches(e,KeyStrokes.DUPLICATE)) {
-//            ActionRouter actionRouter = ActionRouter.getInstance();
-//            actionRouter.doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.DUPLICATE));
+            e.consume();
+        } else if (KeyStrokes.matches(e,KeyStrokes.DUPLICATE)) {
+            ActionRouter actionRouter = ActionRouter.getInstance();
+            actionRouter.doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.DUPLICATE));
+            e.consume();
         }
     }
 

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1411460&r1=1411459&r2=1411460&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Mon Nov 19 22:28:27 2012
@@ -149,6 +149,7 @@ and right angle bracket (>) in search
 <li><bugzilla>54055</bugzilla> - View Results tree: = signs are stripped from parameter values at HTTP tab</li>
 <li><bugzilla>54129</bugzilla> - Search Feature does not find text although existing in elements </li>
 <li><bugzilla>54023</bugzilla> - Unable to start JMeter from a root directory and if the full path of JMeter installation contains one or more spaces (Unix/linux)</li>
+<li><bugzilla>54172</bugzilla> - Duplicate shortcut key not working and CTRL+C / CTRL+V / CTRL+V do not cancel default event</li>
 </ul>
 
 <!-- =================== Improvements =================== -->