Changeset 0e3d48ffbd55…
Parent 0d32413d141c…
by
Changes to one file · Browse files at 0e3d48ffbd55 Showing diff from parent 0d32413d141c Diff from another changeset...
@@ -15,7 +15,7 @@ from PyQt4.QtCore import Qt, QVariant, SIGNAL, SLOT, QAbstractTableModel
from PyQt4.QtCore import QObject, QEvent, QMimeData, QUrl, QString, QSettings
from PyQt4.QtGui import QWidget, QVBoxLayout, QSplitter, QTreeView, QLineEdit
-from PyQt4.QtGui import QTextEdit, QFont, QColor, QDrag
+from PyQt4.QtGui import QTextEdit, QFont, QColor, QDrag, QApplication
from PyQt4.QtGui import QFrame, QHBoxLayout, QLabel, QPushButton, QMenu
from PyQt4.QtGui import QIcon, QPixmap, QToolButton, QDialog
@@ -396,8 +396,8 @@ return QTreeView.mousePressEvent(self, event)
def mouseMoveEvent(self, event):
- dist = event.pos() - self.pressPos
- if abs(dist.x()) > 5 or abs(dist.y()) > 2:
+ if (event.pos() - self.pressPos).manhattanLength() > \
+ QApplication.startDragDistance():
self.dragObject()
return QTreeView.mouseMoveEvent(self, event)
|
Loading...