[pitivi: 17/20] ui.trackobject: only set context mode during a key_press when context is not None
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 17/20] ui.trackobject: only set context mode during a key_press when context is not None
- Date: Wed, 15 Jul 2009 06:38:19 +0000 (UTC)
commit 563dad4f57215cb1a5cf4508aad84bb327b4b4c6
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Tue Jul 14 18:21:31 2009 -0700
ui.trackobject: only set context mode during a key_press when context is not None
pitivi/ui/trackobject.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/trackobject.py b/pitivi/ui/trackobject.py
index 0a48222..4023426 100644
--- a/pitivi/ui/trackobject.py
+++ b/pitivi/ui/trackobject.py
@@ -92,6 +92,7 @@ def text_size(text):
class TimelineController(controller.Controller):
_cursor = ARROW
+ _context = None
def enter(self, unused, unused2):
self._view.focus()
@@ -110,6 +111,7 @@ class TimelineController(controller.Controller):
def drag_end(self, item, target, event):
self._context.finish()
+ self._context = None
self._view.app.action_log.commit()
def set_pos(self, item, pos):
@@ -127,11 +129,11 @@ class TimelineController(controller.Controller):
return self._context.DEFAULT
def key_press(self, keyval):
- if self._dragging:
+ if self._context:
self._context.setMode(self._getMode())
def key_release(self, keyval):
- if self._dragging:
+ if self._context:
self._context.setMode(self._getMode())
class TrimHandle(View, goocanvas.Image, Zoomable):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]