-rw-r--r-- | korganizer/kotodoview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 99402c4..da8b4bc 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -189,67 +189,67 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) { #ifndef KORG_NODND QPoint p(contentsToViewport(e->pos())); QListViewItem *i = itemAt(p); mMousePressed = false; if (i) { // if the user clicked into the root decoration of the item, don't // try to start a drag! if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin() || p.x() < header()->sectionPos(header()->mapToIndex(0))) { if (e->button()==Qt::LeftButton) { mPressPos = e->pos(); mMousePressed = true; } } } #endif QListView::contentsMousePressEvent(e); } void KOTodoListView::paintEvent(QPaintEvent* e) { emit paintNeeded(); QListView::paintEvent( e); } void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) { #ifndef KORG_NODND - QListView::contentsMouseMoveEvent(e); + //QListView::contentsMouseMoveEvent(e); if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > - QApplication::startDragDistance()) { + QApplication::startDragDistance()*3) { mMousePressed = false; QListViewItem *item = itemAt(contentsToViewport(mPressPos)); if (item) { DndFactory factory( mCalendar ); ICalDrag *vd = factory.createDrag( ((KOTodoViewItem *)item)->todo(),viewport()); internalDrop = false; // we cannot do any senseful here, because the DnD is still broken in Qt if (vd->drag()) { if ( !internalDrop ) { //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); qDebug("Dnd: External move: Delete drag source "); } else qDebug("Dnd: Internal move "); } else { if ( !internalDrop ) { qDebug("Dnd: External Copy"); } else qDebug("DnD: Internal copy: Copy pending"); } } } #endif } void KOTodoListView::keyPressEvent ( QKeyEvent * e ) { QListViewItem* cn; if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { cn = currentItem(); if ( cn ) { |