summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp10
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
@@ -381,7 +381,7 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
void KOAgenda::popupMenu()
{
mPopupTimer->stop();
- if ( mPopupKind == 1 ) {
+ if ( mPopupKind == 1 || mPopupKind == 3 ) {
if (mActionItem ) {
endItemAction();
}
@@ -389,17 +389,17 @@ void KOAgenda::popupMenu()
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);
@@ -470,6 +470,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mPopupItem = (KOAgendaItem *)object;
mPopupKind = 1;
if (me->button() == RightButton) {
+ mPopupKind = 3;
popupMenu();
} else if (me->button() == LeftButton) {
mActionItem = (KOAgendaItem *)object;
@@ -499,6 +500,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mCurrentCellY = gy;
mStartCellX = gx;
mStartCellY = gy;
+ mPopupKind = 4;
popupMenu();
} else if (me->button() == LeftButton) {
setCursor(arrowCursor);