Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

status: use QApplication.startDragDistance()

Changeset 0e3d48ffbd55

Parent 0d32413d141c

by Steve Borho

Changes to one file · Browse files at 0e3d48ffbd55 Showing diff from parent 0d32413d141c Diff from another changeset...

 
15
16
17
18
 
19
20
21
 
396
397
398
399
400
 
 
401
402
403
 
15
16
17
 
18
19
20
21
 
396
397
398
 
 
399
400
401
402
403
@@ -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)