summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.cpp42
-rw-r--r--korganizer/datenavigatorcontainer.h2
-rw-r--r--korganizer/kdatenavigator.cpp3
4 files changed, 33 insertions, 16 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 9a4e719..6ed6a1c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1920,3 +1920,2 @@ void CalendarView::readSettings()
mMainFrame->setSizes(sizes);
-
if ( dateCount == 5 ) mNavigator->selectWorkWeek();
@@ -1928,2 +1927,3 @@ void CalendarView::readSettings()
mViewManager->readSettings( config );
+ QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) );
}
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 2290c53..11dc592 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -42,2 +42,3 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
{
+ mResizeEnabled = false;
mExtraViews.setAutoDelete( true );
@@ -45,3 +46,3 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
mNavigatorView = new KDateNavigator( this, name );
-
+ mNavigatorView->hide();
connectNavigatorView( mNavigatorView );
@@ -220,12 +221,5 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
connectNavigatorView( n );
- n->show();
- }
- int iii = 0;
- while ( iii < ( mExtraViews.count() ) ) {
- if ( iii < count-1 )
- mExtraViews.at( iii )->show();
- else
- mExtraViews.at( iii )->hide();
- ++iii;
+ // n->show();
}
+
@@ -268,2 +262,12 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
}
+ int iii = 0;
+ int ccc = mHorizontalCount * mVerticalCount;
+ mNavigatorView->show();
+ while ( iii < ( mExtraViews.count() ) ) {
+ if ( iii < ccc-1 )
+ mExtraViews.at( iii )->show();
+ else
+ mExtraViews.at( iii )->hide();
+ ++iii;
+ }
}
@@ -395,3 +399,8 @@ void DateNavigatorContainer::setBaseDates()
}
-
+void DateNavigatorContainer::setResizeEnabled()
+{
+ mResizeEnabled = true;
+ //qDebug("DateNavigatorContainer::setResizeEnabled ");
+ checkUpdateDayMatrixDates();
+}
void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
@@ -399,6 +408,11 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
-
+ //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height());
//qDebug("COUNT %d ", mExtraViews.count());
-
- mUpdateTimer->start( 250 );
+ if ( ! mResizeEnabled ) {
+ //qDebug("NOT ResizeEnabled");
+ return;
+ }
+ else
+ mUpdateTimer->start( 250 );
+
//updateDayMatrixDates();
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index d2f397d..ac9745d 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -65,2 +65,3 @@ class DateNavigatorContainer: public QWidget
void slotgoPrevYear();
+ void setResizeEnabled();
@@ -91,2 +92,3 @@ class DateNavigatorContainer: public QWidget
private:
+ bool mResizeEnabled;
QTimer* mUpdateTimer;
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 0cb767f..5eccfd6 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -121,3 +121,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
mFontChanged = false;
- resize ( 3,3 );
+ //resize ( 3,3 );
@@ -373,2 +373,3 @@ void KDateNavigator::setShowWeekNums(bool enabled)
{
+ qDebug("KDateNavigator::setShowWeekNums***************************** ");
m_bShowWeekNums = enabled;