-rw-r--r-- | korganizer/kodaymatrix.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 5b5703f..b8a0f09 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -793,8 +793,12 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) if ( mSelEndT/7 >= 6 - rowModulo ) addRow = mSelEndT/7 - 5 + rowModulo; } + //qDebug("%d %d %d ",selh, row, addRow ); + int addrow2 = addRow-selh+1; + if ( addrow2 < 0 ) + addrow2 = 0; if (selh > 1) { - p.fillRect(1, (row+1)*dheight, 7*dwidth+colModulo, (selh-1)*dheight+addRow,selcol); + p.fillRect(1, (row+1)*dheight+addrow2, 7*dwidth+colModulo, (selh-1)*dheight+addRow,selcol); } // draw last block from left to mSelEndT selw = mSelEndT-7*(mSelEndT/7)+1; |