-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 @@ -382,5 +382,5 @@ void KOAgenda::popupMenu() { mPopupTimer->stop(); - if ( mPopupKind == 1 ) { + if ( mPopupKind == 1 || mPopupKind == 3 ) { if (mActionItem ) { endItemAction(); @@ -390,15 +390,15 @@ void KOAgenda::popupMenu() //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); @@ -471,4 +471,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupKind = 1; if (me->button() == RightButton) { + mPopupKind = 3; popupMenu(); } else if (me->button() == LeftButton) { @@ -500,4 +501,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mStartCellX = gx; mStartCellY = gy; + mPopupKind = 4; popupMenu(); } else if (me->button() == LeftButton) { |