Author: akuchinsky
Date: 2008-09-20 05:57:11 -0700 (Sat, 20 Sep 2008)
New Revision: 14938
Modified:
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
Log:
returns from mouseDragged, mouseReleased events if shift is not being held down
AND there are no regions in the current network view
Modified:
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
===================================================================
---
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
2008-09-19 23:21:48 UTC (rev 14937)
+++
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
2008-09-20 12:57:11 UTC (rev 14938)
@@ -444,8 +444,11 @@
*/
public void mouseDragged(MouseEvent e) {
- //if (!e.isShiftDown()) { return; }
-
+ // exit right away if we aren't working with a region
+ if (!e.isShiftDown() &&
+ (LayoutRegionManager.getNumRegionsForView
+
(Cytoscape.getCurrentNetworkView()) < 1)) { return; }
+
onEdge = calculateOnEdge(e.getPoint(), pickedRegion);
if (e.isShiftDown() && !dragging) {
@@ -521,7 +524,10 @@
*/
public void mouseReleased(MouseEvent e) {
- //if (!e.isShiftDown()) { return; }
+ // exit right away if we aren't working with a region
+ if (!e.isShiftDown() &&
+ (LayoutRegionManager.getNumRegionsForView
+
(Cytoscape.getCurrentNetworkView()) < 1)) { return; }
if (dragging) {
dragging = false;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---