openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00591
[Branch ~openshot.code/openshot/main] Rev 697: Added a new keyboard shortcut: SHIFT + Click on transition with mouse. This removes the transit...
------------------------------------------------------------
revno: 697
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Sun 2012-09-09 15:08:32 -0500
message:
Added a new keyboard shortcut: SHIFT + Click on transition with mouse. This removes the transition (i.e. a quick way to delete transitions and clips from the timeline, without using the right click menu).
modified:
openshot/classes/transition.py
--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main
Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/classes/transition.py'
--- openshot/classes/transition.py 2012-09-09 19:58:31 +0000
+++ openshot/classes/transition.py 2012-09-09 20:08:32 +0000
@@ -222,13 +222,27 @@
# ARROW MODE
if isArrow:
-
- # change the cursor for the drag n drop operation
- fleur = gtk.gdk.Cursor (gtk.gdk.FLEUR)
- canvas = item.get_canvas ()
- self.stored_x = item.get_bounds().x1
- self.stored_y = item.get_bounds().y1
- canvas.pointer_grab (item, gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.BUTTON_RELEASE_MASK, fleur, event.time)
+
+ if self.parent.parent.project.form._SHIFT:
+ # remove transition from goocanvas
+ parent = item.get_parent()
+ child_num = parent.find_child (item)
+ parent.remove_child (child_num)
+
+ # remove transition from parent track
+ self.parent.transitions.remove(self)
+
+ # mark project as modified
+ self.parent.parent.project.set_project_modified(is_modified=True, refresh_xml=True)
+
+ else:
+
+ # change the cursor for the drag n drop operation
+ fleur = gtk.gdk.Cursor (gtk.gdk.FLEUR)
+ canvas = item.get_canvas ()
+ self.stored_x = item.get_bounds().x1
+ self.stored_y = item.get_bounds().y1
+ canvas.pointer_grab (item, gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.BUTTON_RELEASE_MASK, fleur, event.time)
# RESIZE MODE
elif isResize: