-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 | |||
@@ -834,43 +834,43 @@ void KOAgenda::endSelectAction( bool emitNewEvent ) | |||
834 | 834 | ||
835 | void KOAgenda::startItemAction(QPoint viewportPos) | 835 | void KOAgenda::startItemAction(QPoint viewportPos) |
836 | { | 836 | { |
837 | int x,y; | 837 | int x,y; |
838 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 838 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
839 | int gx,gy; | 839 | int gx,gy; |
840 | contentsToGrid(x,y,gx,gy); | 840 | contentsToGrid(x,y,gx,gy); |
841 | 841 | ||
842 | mStartCellX = gx; | 842 | mStartCellX = gx; |
843 | mStartCellY = gy; | 843 | mStartCellY = gy; |
844 | mCurrentCellX = gx; | 844 | mCurrentCellX = gx; |
845 | mCurrentCellY = gy; | 845 | mCurrentCellY = gy; |
846 | bool allowResize = ( mActionItem->incidence()->typeID() != todoID ); | ||
846 | 847 | ||
847 | if (mAllDayMode) { | 848 | if (mAllDayMode) { |
848 | int gridDistanceX = (x - gx * mGridSpacingX); | 849 | int gridDistanceX = (x - gx * mGridSpacingX); |
849 | if (gridDistanceX < mResizeBorderWidth && | 850 | if ( allowResize && gridDistanceX < mResizeBorderWidth && |
850 | mActionItem->cellX() == mCurrentCellX) { | 851 | mActionItem->cellX() == mCurrentCellX) { |
851 | mActionType = RESIZELEFT; | 852 | mActionType = RESIZELEFT; |
852 | setCursor(sizeHorCursor); | 853 | setCursor(sizeHorCursor); |
853 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && | 854 | } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && |
854 | mActionItem->cellXWidth() == mCurrentCellX) { | 855 | mActionItem->cellXWidth() == mCurrentCellX) { |
855 | mActionType = RESIZERIGHT; | 856 | mActionType = RESIZERIGHT; |
856 | setCursor(sizeHorCursor); | 857 | setCursor(sizeHorCursor); |
857 | } else { | 858 | } else { |
858 | mActionType = MOVE; | 859 | mActionType = MOVE; |
859 | mActionItem->startMove(); | 860 | mActionItem->startMove(); |
860 | setCursor(sizeAllCursor); | 861 | setCursor(sizeAllCursor); |
861 | } | 862 | } |
862 | } else { | 863 | } else { |
863 | int gridDistanceY = (y - gy * mGridSpacingY); | 864 | int gridDistanceY = (y - gy * mGridSpacingY); |
864 | bool allowResize = ( mActionItem->incidence()->typeID() != todoID ); | ||
865 | if (allowResize && gridDistanceY < mResizeBorderWidth && | 865 | if (allowResize && gridDistanceY < mResizeBorderWidth && |
866 | mActionItem->cellYTop() == mCurrentCellY && | 866 | mActionItem->cellYTop() == mCurrentCellY && |
867 | !mActionItem->firstMultiItem()) { | 867 | !mActionItem->firstMultiItem()) { |
868 | mActionType = RESIZETOP; | 868 | mActionType = RESIZETOP; |
869 | setCursor(sizeVerCursor); | 869 | setCursor(sizeVerCursor); |
870 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && | 870 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && |
871 | mActionItem->cellYBottom() == mCurrentCellY && | 871 | mActionItem->cellYBottom() == mCurrentCellY && |
872 | !mActionItem->lastMultiItem()) { | 872 | !mActionItem->lastMultiItem()) { |
873 | mActionType = RESIZEBOTTOM; | 873 | mActionType = RESIZEBOTTOM; |
874 | setCursor(sizeVerCursor); | 874 | setCursor(sizeVerCursor); |
875 | } else { | 875 | } else { |
876 | mActionType = MOVE; | 876 | mActionType = MOVE; |