-rw-r--r-- | korganizer/kodaymatrix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 36cd990..120bc89 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -673,49 +673,49 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
673 | int xyOff = frameWidth(); | 673 | int xyOff = frameWidth(); |
674 | int colModulo = sz.width() % 7; | 674 | int colModulo = sz.width() % 7; |
675 | int rowModulo = sz.height() % 6; | 675 | int rowModulo = sz.height() % 6; |
676 | //qDebug("col %d row %d ",colModulo,rowModulo ); | 676 | //qDebug("col %d row %d ",colModulo,rowModulo ); |
677 | 677 | ||
678 | bool isRTL = KOGlobals::self()->reverseLayout(); | 678 | bool isRTL = KOGlobals::self()->reverseLayout(); |
679 | 679 | ||
680 | // draw background and topleft frame | 680 | // draw background and topleft frame |
681 | p.fillRect(pevent->rect(), mDefaultBackColor); | 681 | p.fillRect(pevent->rect(), mDefaultBackColor); |
682 | p.setPen(mDefaultTextColor); | 682 | p.setPen(mDefaultTextColor); |
683 | p.drawRect(0, 0, sz.width()+1, sz.height()+1); | 683 | p.drawRect(0, 0, sz.width()+1, sz.height()+1); |
684 | int mSelStartT = mSelStart; | 684 | int mSelStartT = mSelStart; |
685 | int mSelEndT = mSelEnd; | 685 | int mSelEndT = mSelEnd; |
686 | if ( mSelEndT >= NUMDAYS ) | 686 | if ( mSelEndT >= NUMDAYS ) |
687 | mSelEndT = NUMDAYS-1; | 687 | mSelEndT = NUMDAYS-1; |
688 | // draw selected days with highlighted background color | 688 | // draw selected days with highlighted background color |
689 | if (mSelStart != NOSELECTION) { | 689 | if (mSelStart != NOSELECTION) { |
690 | bool skip = false; | 690 | bool skip = false; |
691 | if ( ! mouseDown ) { | 691 | if ( ! mouseDown ) { |
692 | int mo = days[20].month(); | 692 | int mo = days[20].month(); |
693 | //qDebug("-- %d %d ", mSelStartT, mSelEndT); | 693 | //qDebug("-- %d %d ", mSelStartT, mSelEndT); |
694 | //qDebug("%d %d %d - d %d", mo, days[mSelStartT].month() , days[mSelEndT].month(), days[mSelEndT].day() ); | 694 | //qDebug("%d %d %d - d %d", mo, days[mSelStartT].month() , days[mSelEndT].month(), days[mSelEndT].day() ); |
695 | int startMo = days[mSelStartT].month(); | 695 | int startMo = days[mSelStartT].month(); |
696 | int endMo = days[mSelEndT].month(); | 696 | int endMo = days[mSelEndT].month(); |
697 | if ( startMo == 12 && mo == 1 && endMo == 1 ) | 697 | if ( startMo == 12 && mo == 1 && endMo <= 2 ) |
698 | startMo = 1; | 698 | startMo = 1; |
699 | if ( endMo == 1 && mo == 12 ) | 699 | if ( endMo == 1 && mo == 12 ) |
700 | endMo = 12; | 700 | endMo = 12; |
701 | if ( (startMo > mo || endMo < mo) ) { | 701 | if ( (startMo > mo || endMo < mo) ) { |
702 | skip = true; | 702 | skip = true; |
703 | } else { | 703 | } else { |
704 | if ( days[mSelStartT].month() != mo ) { | 704 | if ( days[mSelStartT].month() != mo ) { |
705 | int add = days[mSelStartT].daysInMonth ()-days[mSelStartT].day(); | 705 | int add = days[mSelStartT].daysInMonth ()-days[mSelStartT].day(); |
706 | mSelStartT += add +1; | 706 | mSelStartT += add +1; |
707 | } | 707 | } |
708 | if ( days[mSelEndT].month() != mo ) { | 708 | if ( days[mSelEndT].month() != mo ) { |
709 | int sub = days[mSelEndT].day(); | 709 | int sub = days[mSelEndT].day(); |
710 | mSelEndT -= sub ; | 710 | mSelEndT -= sub ; |
711 | } | 711 | } |
712 | } | 712 | } |
713 | } | 713 | } |
714 | if ( ! skip ) { | 714 | if ( ! skip ) { |
715 | row = mSelStartT/7; | 715 | row = mSelStartT/7; |
716 | col = mSelStartT -row*7; | 716 | col = mSelStartT -row*7; |
717 | QColor selcol = KOPrefs::instance()->mHighlightColor; | 717 | QColor selcol = KOPrefs::instance()->mHighlightColor; |
718 | int addCol = 0; | 718 | int addCol = 0; |
719 | int addRow = 0; | 719 | int addRow = 0; |
720 | int addRow2 = 0; | 720 | int addRow2 = 0; |
721 | int addCol2 = 0; | 721 | int addCol2 = 0; |