From f9a1b1e8ac52218360731fae67993704c20f17fe Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Jul 2005 18:49:19 +0000 Subject: fixxii --- diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1785b8a..7566c6f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -678,23 +678,43 @@ void CalendarView::scrollBarValue(int val ) int day = mNavigator->selectedDates().first().dayOfYear(); int stepdays = val; if ( mDateScrollBar->lineStep () <= count ) { - val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); + //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); //qDebug("VAL %d ",val ); stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); - stepdays = day-1+stepdays; + stepdays = day+stepdays; if ( stepdays < 0 ) stepdays = 0; } - if ( stepdays == day -1 ) { + if ( stepdays == day ) { block = false; return; } int year = mNavigator->selectedDates().first().year(); QDate d ( year,1,1 ); - mNavigator->selectDates( d.addDays( stepdays) , count ); + mNavigator->selectDates( d.addDays( stepdays-1) , count ); block = false; #endif } +void CalendarView::updateView(const QDate &start, const QDate &end) +{ +#ifdef DESKTOP_VERSION + if ( ! mDateScrollBar->draggingSlider () ) { + int dof = start.dayOfYear(); + //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); + if ( dof != mDateScrollBar->value() ) { + mDateScrollBar->blockSignals( true ); + mDateScrollBar->setValue( start.dayOfYear()); + mDateScrollBar->blockSignals( false ); + } + } +#endif + mTodoList->updateView(); + mViewManager->updateView(start, end); + //mDateNavigator->updateView(); +} + + + void CalendarView::checkFiles() { QString message; @@ -2633,22 +2653,6 @@ void CalendarView::updateTodoViews() } -void CalendarView::updateView(const QDate &start, const QDate &end) -{ -#ifdef DESKTOP_VERSION - if ( ! mDateScrollBar->draggingSlider () ) { - int dof = start.dayOfYear()-1; - if ( dof != mDateScrollBar->value() ) { - mDateScrollBar->blockSignals( true ); - mDateScrollBar->setValue( start.dayOfYear()-1); - mDateScrollBar->blockSignals( false ); - } - } -#endif - mTodoList->updateView(); - mViewManager->updateView(start, end); - //mDateNavigator->updateView(); -} void CalendarView::clearAllViews() { -- cgit v0.9.0.2