[pitivi/gtktimeline] timeline: Do not forget to finish dragging context when we are done
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/gtktimeline] timeline: Do not forget to finish dragging context when we are done
- Date: Thu, 14 May 2015 18:58:08 +0000 (UTC)
commit 3a154b22a2697588a2472bcd0b77229ce21d6100
Author: Thibault Saunier <tsaunier gnome org>
Date: Thu May 14 20:55:53 2015 +0200
timeline: Do not forget to finish dragging context when we are done
And remove old unnecessary code that aimed at handling that.
Fixes http://phabricator.freedesktop.org/T68
pitivi/timeline/timeline.py | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index dc018f6..0a40a2a 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -610,7 +610,6 @@ class Timeline(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
def __setUpDragAndDrop(self):
self.got_dragged = False
self.dropHighlight = False
- self.dropOccured = False
self.dropDataReady = False
self.dropData = None
self._createdClips = False
@@ -710,6 +709,7 @@ class Timeline(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
if target.name() == "text/uri-list":
self.debug("Got list of URIs")
if self.__last_clips_on_leave:
+ self._createdClips = False
self.dropData = None
self.dropDataReady = False
@@ -720,6 +720,7 @@ class Timeline(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
self.parent._setBestZoomRatio()
self.dragEnd()
+ context.finish(True, False, timestamp)
elif target.name() == "pitivi/effect":
self.fixme("TODO Implement effect support")
@@ -737,21 +738,9 @@ class Timeline(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
self.dropData = factory_name
self.dropDataReady = True
elif selection_data.get_length() > 0:
- # Dragging assets from the Media Library.
- # if not self.dropOccured:
- # self.timeline.resetGhostClips()
self.dropData = selection_data.get_uris()
self.dropDataReady = True
-
- if self.dropOccured:
- # The data was requested by the drop handler.
- self.dropOccured = False
- drag_context.finish(True, False, timestamp)
- else:
- # The data was requested by the move handler.
- self.isDraggedClip = not dragging_effect
- self._createdClips = False
- self.debug("Data received")
+ self.isDraggedClip = not dragging_effect
# Handle layers
def _layerAddedCb(self, timeline, bLayer):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]