Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwrobell@pld-linux.org <wrobell@pld-linux.org@a8418922-720d-0410-834f-a69b97ada669>2008-12-20 15:52:23 (GMT)
committer wrobell@pld-linux.org <wrobell@pld-linux.org@a8418922-720d-0410-834f-a69b97ada669>2008-12-20 15:52:23 (GMT)
commit79cab767f509e98d4c0800c8c03e888e36cc947b (patch)
tree434a76f1cefbbdec676d7756132036942edad1eb
parent43027432b88fad3e45791b57fea898804499aa06 (diff)
- removed unnecessary view/canvas parameters from
ConnectHandleTool.{connect_handle,post_connect} methods git-svn-id: http://svn.devjavu.com/gaphor/gaphas/trunk@2521 a8418922-720d-0410-834f-a69b97ada669
-rw-r--r--gaphas/tool.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/gaphas/tool.py b/gaphas/tool.py
index 257cf4c..3f63f07 100644
--- a/gaphas/tool.py
+++ b/gaphas/tool.py
@@ -917,15 +917,13 @@ class ConnectHandleTool(HandleTool):
return True
- def post_connect(self, view, line, handle, item, port):
+ def post_connect(self, line, handle, item, port):
"""
The method is invoked just before connection is performed by
`ConnectHandleTool.connect` method. It can be overriden by deriving
tools to perform connection in higher level of application stack.
:Parameters:
- view
- View used by user.
line
Item connecting to connectable item.
handle
@@ -967,19 +965,17 @@ class ConnectHandleTool(HandleTool):
return
# low-level connection
- self.connect_handle(view.canvas, line, handle, item, port)
+ self.connect_handle(line, handle, item, port)
# connection in higher level of application stack
- self.post_connect(view, line, handle, item, port)
+ self.post_connect(line, handle, item, port)
- def connect_handle(self, canvas, line, handle, item, port):
+ def connect_handle(self, line, handle, item, port):
"""
Create constraint between handle of a line and port of connectable
item.
:Parameters:
- canvas
- Canvas owning the items.
line
Connecting item.
handle
@@ -992,7 +988,7 @@ class ConnectHandleTool(HandleTool):
ConnectHandleTool.create_constraint(line, handle, item, port)
handle.connected_to = item
- handle.disconnect = DisconnectHandle(canvas, line, handle)
+ handle.disconnect = DisconnectHandle(line, handle)
def disconnect(self, view, line, handle):
@@ -1096,8 +1092,8 @@ class ConnectHandleTool(HandleTool):
class DisconnectHandle(object):
- def __init__(self, canvas, item, handle):
- self.canvas = canvas
+ def __init__(self, item, handle):
+ self.canvas = item.canvas
self.item = item
self.handle = handle