-rw-r--r-- | korganizer/koagenda.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index d9d1283..1d4d6de 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -814,83 +814,83 @@ void KOAgenda::performSelectAction(QPoint viewportPos) mGridSpacingX, mSelectionYTop, mGridSpacingX, selectionHeight,false ); mCurrentCellY = gy; } else { } } } void KOAgenda::endSelectAction( bool emitNewEvent ) { mActionType = NOP; mScrollUpTimer.stop(); mScrollDownTimer.stop(); emit newTimeSpanSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); if ( emitNewEvent && mStartCellY < mCurrentCellY ) { emit newEventSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); } } void KOAgenda::startItemAction(QPoint viewportPos) { int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); int gx,gy; contentsToGrid(x,y,gx,gy); mStartCellX = gx; mStartCellY = gy; mCurrentCellX = gx; mCurrentCellY = gy; + bool allowResize = ( mActionItem->incidence()->typeID() != todoID ); if (mAllDayMode) { int gridDistanceX = (x - gx * mGridSpacingX); - if (gridDistanceX < mResizeBorderWidth && + if ( allowResize && gridDistanceX < mResizeBorderWidth && mActionItem->cellX() == mCurrentCellX) { mActionType = RESIZELEFT; setCursor(sizeHorCursor); - } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && + } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && mActionItem->cellXWidth() == mCurrentCellX) { mActionType = RESIZERIGHT; setCursor(sizeHorCursor); } else { mActionType = MOVE; mActionItem->startMove(); setCursor(sizeAllCursor); } } else { int gridDistanceY = (y - gy * mGridSpacingY); - bool allowResize = ( mActionItem->incidence()->typeID() != todoID ); if (allowResize && gridDistanceY < mResizeBorderWidth && mActionItem->cellYTop() == mCurrentCellY && !mActionItem->firstMultiItem()) { mActionType = RESIZETOP; setCursor(sizeVerCursor); } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && mActionItem->cellYBottom() == mCurrentCellY && !mActionItem->lastMultiItem()) { mActionType = RESIZEBOTTOM; setCursor(sizeVerCursor); } else { mActionType = MOVE; mActionItem->startMove(); setCursor(sizeAllCursor); } } } void KOAgenda::performItemAction(QPoint viewportPos) { // kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; // QPoint point = viewport()->mapToGlobal(viewportPos); // kdDebug() << "Global: " << point.x() << "," << point.y() << endl; // point = clipper()->mapFromGlobal(point); // kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; // kdDebug() << "visible height: " << visibleHeight() << endl; int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); // kdDebug() << "contents: " << x << "," << y << "\n" << endl; int gx,gy; contentsToGrid(x,y,gx,gy); QPoint clipperPos = clipper()-> |