summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-03 18:49:19 (UTC)
committer zautrix <zautrix>2005-07-03 18:49:19 (UTC)
commitf9a1b1e8ac52218360731fae67993704c20f17fe (patch) (side-by-side diff)
tree77da06abff6e8b12d2d6170909f77de213f0e172 /korganizer
parent58826b9705ceec6d21034ae166341509ca455481 (diff)
downloadkdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.zip
kdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.tar.gz
kdepimpi-f9a1b1e8ac52218360731fae67993704c20f17fe.tar.bz2
fixxii
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp44
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
@@ -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()
{