[pitivi] Fix layer drag'n'drop to be more intuitive



commit 2fa49d9c5f4e4b554f4a47429d35082d72eb72ea
Author: Paul Lange <palango gmx de>
Date:   Mon Jul 16 16:58:55 2012 +0200

    Fix layer drag'n'drop to be more intuitive

 pitivi/timeline/timeline.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 64dcf70..b9b3f78 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -754,7 +754,14 @@ class TimelineControls(gtk.VBox, Loggable):
 
         self._unhighlightSeparators()
 
-        self.moveControlWidget(widget, self._getIndexForPosition(y, widget))
+        current = self.getControlIndex(widget)
+        index = self._getIndexForPosition(y, widget)
+
+        # if current control is before desired index move one place less
+        if current < index:
+            index -= 1
+
+        self.moveControlWidget(widget, index)
 
     def _dragLeaveCb(self, widget, context, timestamp):
         self._unhighlightSeparators()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]