summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-03-27 23:25:35 (UTC)
committer zautrix <zautrix>2005-03-27 23:25:35 (UTC)
commit67dc8738c14716e18e4c433e5c0da474456c9859 (patch) (side-by-side diff)
treeb6bd7d0d0dcc0a389bd9dce57d124d035495aeeb /korganizer/koagenda.cpp
parente73b9d31e463f39f666a008bdde8160a9e5c5dbf (diff)
downloadkdepimpi-67dc8738c14716e18e4c433e5c0da474456c9859.zip
kdepimpi-67dc8738c14716e18e4c433e5c0da474456c9859.tar.gz
kdepimpi-67dc8738c14716e18e4c433e5c0da474456c9859.tar.bz2
small fixes
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index ed7a443..1a24887 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -436,48 +436,56 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
int selectionCellX = mSelectionCellX * mGridSpacingX;
int selectionYTop = mSelectionYTop;
int gridSpacingX = mGridSpacingX;
int selectionHeight = mSelectionHeight;
clearSelection();
repaintContents( selectionCellX, selectionYTop,
gridSpacingX, selectionHeight,false );
}
selectItem(mActionItem);
Incidence *incidence = mActionItem->incidence();
if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) {
mActionItem = 0;
} else {
startItemAction(viewportPos);
}
}
}
} else { // ---------- viewport()
mPopupItem = 0;
mPopupKind = 2;
selectItem(0);
mActionItem = 0;
mPopupPos = viewport()->mapToGlobal( me->pos() );
if (me->button() == RightButton) {
+ int x,y;
+ viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
+ int gx,gy;
+ contentsToGrid(x,y,gx,gy);
+ mCurrentCellX = gx;
+ mCurrentCellY = gy;
+ mStartCellX = gx;
+ mStartCellY = gy;
popupMenu();
} else if (me->button() == LeftButton) {
setCursor(arrowCursor);
startSelectAction(viewportPos);
}
}
break;
case QEvent::MouseButtonRelease:
if (me->button() == LeftButton ) {
mPopupTimer->stop();
}
if (object != viewport()) {
if (me->button() == LeftButton && mLeftMouseDown) {
if (mActionItem) {
QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos));
//qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 );
if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) {
mScrollUpTimer.stop();
mScrollDownTimer.stop();
mActionItem->resetMove();
placeSubCells( mActionItem );
// emit startDragSignal( mActionItem->incidence() );
setCursor( arrowCursor );