summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-26 12:35:09 (UTC)
committer zautrix <zautrix>2005-06-26 12:35:09 (UTC)
commitd9255cd129d42abf08efc11ff9b29e831e05e803 (patch) (unidiff)
tree68db283d33a569e71bdc186a36be004ff27c02b4 /korganizer
parentd45f07d85ab62205e07089f6e2f41b0d112ca757 (diff)
downloadkdepimpi-d9255cd129d42abf08efc11ff9b29e831e05e803.zip
kdepimpi-d9255cd129d42abf08efc11ff9b29e831e05e803.tar.gz
kdepimpi-d9255cd129d42abf08efc11ff9b29e831e05e803.tar.bz2
fixx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index b99625c..faddac4 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -444,43 +444,47 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
444 if ( dY < 0 ) 444 if ( dY < 0 )
445 dY = -dY; 445 dY = -dY;
446 if ( dX > blockmoveDist || dY > blockmoveDist ) { 446 if ( dX > blockmoveDist || dY > blockmoveDist ) {
447 mAllAgendaPopup->hide(); 447 mAllAgendaPopup->hide();
448 } 448 }
449 } 449 }
450 return true; 450 return true;
451 } 451 }
452 QPoint viewportPos; 452 QPoint viewportPos;
453 if (object != viewport()) { 453 if (object != viewport()) {
454 blockmoveDist = blockmoveDist*2; 454 blockmoveDist = blockmoveDist*2;
455 viewportPos = ((QWidget *)object)->mapToParent(me->pos()); 455 viewportPos = ((QWidget *)object)->mapToParent(me->pos());
456 } else { 456 } else {
457 viewportPos = me->pos(); 457 viewportPos = me->pos();
458 } 458 }
459 bool objIsNotViewport = (object != viewport()); 459 bool objIsNotViewport = (object != viewport());
460 bool leftButt = false;
461#ifdef DESKTOP_VERSION
462 leftButt = (me->button() == LeftButton);
463#endif
460 switch (me->type()) { 464 switch (me->type()) {
461 case QEvent::MouseButtonPress: 465 case QEvent::MouseButtonPress:
462 if (me->button() == LeftButton) { 466 if (me->button() == LeftButton) {
463 mPopupTimer->start( 600 ); 467 mPopupTimer->start( 600 );
464 mLeftMouseDown = true; 468 mLeftMouseDown = true;
465 } 469 }
466 blockMoving = true; 470 blockMoving = true;
467 startX = viewportPos.x(); 471 startX = viewportPos.x();
468 startY = viewportPos.y(); 472 startY = viewportPos.y();
469 mPopupPos = me->globalPos(); 473 mPopupPos = me->globalPos();
470 if ( objIsNotViewport ) { 474 if ( objIsNotViewport && !leftButt ) {
471 KOAgendaItem * tempItem = (KOAgendaItem *)object; 475 KOAgendaItem * tempItem = (KOAgendaItem *)object;
472 if (mAllDayMode) { 476 if (mAllDayMode) {
473 if ( tempItem->height() > 10 ) { 477 if ( tempItem->height() > 10 ) {
474 int minV = tempItem->height()/4; 478 int minV = tempItem->height()/4;
475 if ( minV > (blockmoveDist/2)-2 ) 479 if ( minV > (blockmoveDist/2)-2 )
476 minV = (blockmoveDist/2)-2; 480 minV = (blockmoveDist/2)-2;
477 bool border = false; 481 bool border = false;
478 int diff = tempItem->y() - viewportPos.y(); 482 int diff = tempItem->y() - viewportPos.y();
479 if ( diff < 0 ) 483 if ( diff < 0 )
480 diff *= -1; 484 diff *= -1;
481 if ( diff < minV ) { 485 if ( diff < minV ) {
482 border = true; 486 border = true;
483 objIsNotViewport = false; 487 objIsNotViewport = false;
484 } 488 }
485 if ( ! border ) { 489 if ( ! border ) {
486 diff = tempItem->y() + tempItem->height()- viewportPos.y(); 490 diff = tempItem->y() + tempItem->height()- viewportPos.y();