author | zautrix <zautrix> | 2005-02-17 09:44:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-17 09:44:18 (UTC) |
commit | d9565b4258279d70fa651e7e6ebe072c0f3755d6 (patch) (side-by-side diff) | |
tree | 3d4aeffd7983b34f9e32392a7e855feb6ce52dde | |
parent | 311181f1415625529db49ae73c6ee0b86e3ce86b (diff) | |
download | kdepimpi-d9565b4258279d70fa651e7e6ebe072c0f3755d6.zip kdepimpi-d9565b4258279d70fa651e7e6ebe072c0f3755d6.tar.gz kdepimpi-d9565b4258279d70fa651e7e6ebe072c0f3755d6.tar.bz2 |
popup agenda fix
-rw-r--r-- | korganizer/koagenda.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index ffa2678..a72e470 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -397,17 +397,16 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) static int startY = 0; static bool block = true; switch (me->type()) { case QEvent::MouseButtonPress: //qDebug("QEvent::MouseButtonPress: "); // kdDebug() << "koagenda: filtered button press" << endl; if (object != viewport()) { if (me->button() == RightButton) { - mClickedItem = (KOAgendaItem *)object; if (mClickedItem) { selectItem(mClickedItem); // emit showIncidencePopupSignal(mClickedItem->incidence()); } //mItemPopup->popup(QCursor::pos()); } else { mActionItem = (KOAgendaItem *)object; @@ -449,27 +448,38 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) case QEvent::MouseButtonRelease: //qDebug("QEvent::MouseButtonRelease: %d",blockNewEvent ); if (me->button() == RightButton && blockNewEvent && !block) { int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); int gx,gy; contentsToGrid(x,y,gx,gy); + if ( object == viewport() ) { if ( mCurrentCellY < mStartCellY +1 ) { //qDebug("mCurrentCellY %d mStartCellY %d ", mCurrentCellY,mStartCellY); mCurrentCellX = gx; mCurrentCellY = gy; mStartCellX = gx; mStartCellY = gy; mNewItemPopup->popup( viewport()->mapToGlobal( me->pos() ) ); break; } else { blockNewEvent = false; } + } else { + mClickedItem = (KOAgendaItem *)object; + if (mActionItem ) { + endItemAction(); + } + if (mClickedItem) { + selectItem(mClickedItem); + emit showIncidencePopupSignal(mClickedItem->incidence()); + } + } } else if (me->button() == RightButton && block ) { if (object != viewport()) { mClickedItem = (KOAgendaItem *)object; if (mActionItem ) { endItemAction(); } if (mClickedItem) { selectItem(mClickedItem); |