diff options
Diffstat (limited to 'view.py')
-rw-r--r-- | view.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -138,11 +138,13 @@ class NewThoughtTool(HandleTool): def on_button_release(self, context, event): logging.debug('NewThoughtTool.ungrab_handle') - context.view.canvas.remove(self._new_connection) - self._new_connection = None + if self._new_connection is not None: + context.view.canvas.remove(self._new_connection) + self._new_connection = None + + context.view.model.create_new_thought(x=event.x, y=event.y, + parent_id=self._parent_thought.id) - context.view.model.create_new_thought(x=event.x, y=event.y, - parent_id=self._parent_thought.id) HandleTool.on_button_release(self, context, event) def move(self, view, item, handle, pos): |