author | zautrix <zautrix> | 2005-07-02 07:02:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 07:02:47 (UTC) |
commit | 58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764 (patch) (side-by-side diff) | |
tree | f2c6c5c541a76a9e77fe8176add728127c7b6a38 /korganizer/komonthview.cpp | |
parent | b51bfb06293b34b77c46954253ab1b5220c8dd03 (diff) | |
download | kdepimpi-58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764.zip kdepimpi-58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764.tar.gz kdepimpi-58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764.tar.bz2 |
fixes
-rw-r--r-- | korganizer/komonthview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 264cf28..4fc447e 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -1771,73 +1771,75 @@ void KOMonthView::updateView() (*cells)[i]->updateCell(); } //qDebug("KOMonthView::updateView() "); processSelectionChange(); // qDebug("---------------------------------------------------------------------+ "); (*cells)[0]->setFocus(); #endif //qDebug("update time %d ", ti.elapsed()); } void KOMonthView::setKeyBoardFocus() { //qDebug("KOMonthView::setKeyBoardFocus() "); bool shootAgain = false; if ( mShowWeekView ) { shootAgain = !mWeekLabelsW[1]->hasFocus(); mWeekLabelsW[1]->setFocus(); } else { shootAgain = !mWeekLabels[mNumWeeks]->hasFocus(); mWeekLabels[mNumWeeks]->setFocus(); } - if ( shootAgain ) { - QTimer::singleShot( 0, this, SLOT ( setKeyBFocus() ) ); + --mKBFcounter; + if ( shootAgain && mKBFcounter > 0 ) { + QTimer::singleShot( 50, this, SLOT ( setKeyBoardFocus() ) ); } } void KOMonthView::setKeyBFocus() { //qDebug("KOMonthView::setKeyBFocus() "); + mKBFcounter = 10; QTimer::singleShot( 0, this, SLOT ( setKeyBoardFocus() ) ); } void KOMonthView::resizeEvent(QResizeEvent * e) { //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); if ( isVisible() ) { //qDebug("KOMonthView::isVisible "); slotComputeLayout(); } else mComputeLayoutTimer->start( 100 ); } void KOMonthView::slotComputeLayout() { mComputeLayoutTimer->stop(); //qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); computeLayout(); - clPending = true; + clPending = true; setKeyBFocus(); } void KOMonthView::computeLayoutWeek() { static int lastWid = 0; static int lastHei = 0; int daysToShow; bool combinedSatSun = false; if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { daysToShow = 6; combinedSatSun = true; } int tWid = topLevelWidget()->size().width(); int tHei = topLevelWidget()->size().height(); int wid = width();//e int hei = height()-1-mNavigatorBar->height(); if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) return; if ( lastWid == width() && lastHei == height() ) { //qDebug("KOListWeekView::No compute layout needed "); return; |