-rw-r--r-- | korganizer/koagenda.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 355f4bb..99009a5 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -380,27 +380,27 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) } void KOAgenda::popupMenu() { mPopupTimer->stop(); - if ( mPopupKind == 1 ) { + if ( mPopupKind == 1 || mPopupKind == 3 ) { if (mActionItem ) { endItemAction(); } mLeftMouseDown = false; // no more leftMouse computation if (mPopupItem) { //mClickedItem = mPopupItem; selectItem(mPopupItem); - if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu ) + if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 1 ) mAllAgendaPopup->installEventFilter( this ); emit showIncidencePopupSignal(mPopupItem->incidence()); } - } else if ( mPopupKind == 2 ) { + } else if ( mPopupKind == 2 || mPopupKind == 4 ) { if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action endSelectAction( false ); // do not emit new event signal mLeftMouseDown = false; // no more leftMouse computation } - if ( KOPrefs::instance()->mBlockPopupMenu ) + if ( KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 2 ) mNewItemPopup->installEventFilter( this ); mNewItemPopup->popup( mPopupPos); } @@ -469,8 +469,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) if (object != viewport()) { mPopupItem = (KOAgendaItem *)object; mPopupKind = 1; if (me->button() == RightButton) { + mPopupKind = 3; popupMenu(); } else if (me->button() == LeftButton) { mActionItem = (KOAgendaItem *)object; if (mActionItem) { @@ -498,8 +499,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mCurrentCellX = gx; mCurrentCellY = gy; mStartCellX = gx; mStartCellY = gy; + mPopupKind = 4; popupMenu(); } else if (me->button() == LeftButton) { setCursor(arrowCursor); startSelectAction(viewportPos); |