author | zautrix <zautrix> | 2005-07-03 18:49:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 18:49:19 (UTC) |
commit | f9a1b1e8ac52218360731fae67993704c20f17fe (patch) (unidiff) | |
tree | 77da06abff6e8b12d2d6170909f77de213f0e172 /korganizer | |
parent | 58826b9705ceec6d21034ae166341509ca455481 (diff) | |
download | kdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.zip kdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.tar.gz kdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.tar.bz2 |
fixxii
-rw-r--r-- | korganizer/calendarview.cpp | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1785b8a..7566c6f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -679,11 +679,11 @@ void CalendarView::scrollBarValue(int val ) | |||
679 | int stepdays = val; | 679 | int stepdays = val; |
680 | if ( mDateScrollBar->lineStep () <= count ) { | 680 | if ( mDateScrollBar->lineStep () <= count ) { |
681 | val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | 681 | //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); |
682 | //qDebug("VAL %d ",val ); | 682 | //qDebug("VAL %d ",val ); |
683 | stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | 683 | stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); |
684 | stepdays = day-1+stepdays; | 684 | stepdays = day+stepdays; |
685 | if ( stepdays < 0 ) stepdays = 0; | 685 | if ( stepdays < 0 ) stepdays = 0; |
686 | } | 686 | } |
687 | if ( stepdays == day -1 ) { | 687 | if ( stepdays == day ) { |
688 | block = false; | 688 | block = false; |
689 | return; | 689 | return; |
@@ -691,9 +691,29 @@ void CalendarView::scrollBarValue(int val ) | |||
691 | int year = mNavigator->selectedDates().first().year(); | 691 | int year = mNavigator->selectedDates().first().year(); |
692 | QDate d ( year,1,1 ); | 692 | QDate d ( year,1,1 ); |
693 | mNavigator->selectDates( d.addDays( stepdays) , count ); | 693 | mNavigator->selectDates( d.addDays( stepdays-1) , count ); |
694 | block = false; | 694 | block = false; |
695 | #endif | 695 | #endif |
696 | 696 | ||
697 | } | 697 | } |
698 | void CalendarView::updateView(const QDate &start, const QDate &end) | ||
699 | { | ||
700 | #ifdef DESKTOP_VERSION | ||
701 | if ( ! mDateScrollBar->draggingSlider () ) { | ||
702 | int dof = start.dayOfYear(); | ||
703 | //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); | ||
704 | if ( dof != mDateScrollBar->value() ) { | ||
705 | mDateScrollBar->blockSignals( true ); | ||
706 | mDateScrollBar->setValue( start.dayOfYear()); | ||
707 | mDateScrollBar->blockSignals( false ); | ||
708 | } | ||
709 | } | ||
710 | #endif | ||
711 | mTodoList->updateView(); | ||
712 | mViewManager->updateView(start, end); | ||
713 | //mDateNavigator->updateView(); | ||
714 | } | ||
715 | |||
716 | |||
717 | |||
698 | void CalendarView::checkFiles() | 718 | void CalendarView::checkFiles() |
699 | { | 719 | { |
@@ -2634,20 +2654,4 @@ void CalendarView::updateTodoViews() | |||
2634 | 2654 | ||
2635 | 2655 | ||
2636 | void CalendarView::updateView(const QDate &start, const QDate &end) | ||
2637 | { | ||
2638 | #ifdef DESKTOP_VERSION | ||
2639 | if ( ! mDateScrollBar->draggingSlider () ) { | ||
2640 | int dof = start.dayOfYear()-1; | ||
2641 | if ( dof != mDateScrollBar->value() ) { | ||
2642 | mDateScrollBar->blockSignals( true ); | ||
2643 | mDateScrollBar->setValue( start.dayOfYear()-1); | ||
2644 | mDateScrollBar->blockSignals( false ); | ||
2645 | } | ||
2646 | } | ||
2647 | #endif | ||
2648 | mTodoList->updateView(); | ||
2649 | mViewManager->updateView(start, end); | ||
2650 | //mDateNavigator->updateView(); | ||
2651 | } | ||
2652 | 2656 | ||
2653 | void CalendarView::clearAllViews() | 2657 | void CalendarView::clearAllViews() |