-rw-r--r-- | korganizer/koagenda.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index b5d52d2..148d914 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1375,4 +1375,47 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1375 | mSelectionCellX * mGridSpacingX; | 1375 | mSelectionCellX * mGridSpacingX; |
1376 | contentsToViewport ( cx, cy, vx,vy); | 1376 | contentsToViewport ( cx, cy, vx,vy); |
1377 | //qDebug(" %d %d %d %d %d", cx, cy, cw,ch,mGridSpacingX-1) ; | ||
1378 | |||
1379 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) { | ||
1380 | if ( mGridSpacingX == cw && mSelectionHeight > 0 && ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | ||
1381 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) ) { | ||
1382 | |||
1383 | int vxSel, vySel; | ||
1384 | contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel); | ||
1385 | int off = mSelectionHeight; | ||
1386 | if ( vySel < 0 ) | ||
1387 | off += vySel; | ||
1388 | //qDebug("OFF %d %d %d", off,vySel, vy ); | ||
1389 | bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); | ||
1390 | } else { | ||
1391 | bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); | ||
1392 | } | ||
1393 | } | ||
1394 | if ( mSelectionHeight > 0 ) { | ||
1395 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); | ||
1396 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | ||
1397 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | ||
1398 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); | ||
1399 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); | ||
1400 | } | ||
1401 | } | ||
1402 | //qDebug("btbl "); | ||
1403 | p->begin( pd ); | ||
1404 | //qDebug("end "); | ||
1405 | #if 0 | ||
1406 | |||
1407 | if ( globalFlagBlockAgenda ) | ||
1408 | return; | ||
1409 | //qDebug("KOAgenda::drawContents "); | ||
1410 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | ||
1411 | ;//drawContentsToPainter(); | ||
1412 | |||
1413 | QPaintDevice* pd = p->device(); | ||
1414 | p->end(); | ||
1415 | int vx, vy; | ||
1416 | int selectionX = KOGlobals::self()->reverseLayout() ? | ||
1417 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : | ||
1418 | mSelectionCellX * mGridSpacingX; | ||
1419 | contentsToViewport ( cx, cy, vx,vy); | ||
1377 | // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; | 1420 | // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; |
1378 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) | 1421 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) |
@@ -1390,4 +1433,12 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1390 | p->begin( pd ); | 1433 | p->begin( pd ); |
1391 | //qDebug("end "); | 1434 | //qDebug("end "); |
1435 | |||
1436 | |||
1437 | |||
1438 | |||
1439 | |||
1440 | |||
1441 | |||
1442 | #endif | ||
1392 | } | 1443 | } |
1393 | 1444 | ||