summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp8
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
@@ -1787,23 +1787,25 @@ void KOMonthView::setKeyBoardFocus()
1787 if ( mShowWeekView ) { 1787 if ( mShowWeekView ) {
1788 shootAgain = !mWeekLabelsW[1]->hasFocus(); 1788 shootAgain = !mWeekLabelsW[1]->hasFocus();
1789 mWeekLabelsW[1]->setFocus(); 1789 mWeekLabelsW[1]->setFocus();
1790 } 1790 }
1791 else { 1791 else {
1792 shootAgain = !mWeekLabels[mNumWeeks]->hasFocus(); 1792 shootAgain = !mWeekLabels[mNumWeeks]->hasFocus();
1793 mWeekLabels[mNumWeeks]->setFocus(); 1793 mWeekLabels[mNumWeeks]->setFocus();
1794 } 1794 }
1795 if ( shootAgain ) { 1795 --mKBFcounter;
1796 QTimer::singleShot( 0, this, SLOT ( setKeyBFocus() ) ); 1796 if ( shootAgain && mKBFcounter > 0 ) {
1797 QTimer::singleShot( 50, this, SLOT ( setKeyBoardFocus() ) );
1797 } 1798 }
1798} 1799}
1799void KOMonthView::setKeyBFocus() 1800void KOMonthView::setKeyBFocus()
1800{ 1801{
1801 //qDebug("KOMonthView::setKeyBFocus() "); 1802 //qDebug("KOMonthView::setKeyBFocus() ");
1803 mKBFcounter = 10;
1802 QTimer::singleShot( 0, this, SLOT ( setKeyBoardFocus() ) ); 1804 QTimer::singleShot( 0, this, SLOT ( setKeyBoardFocus() ) );
1803} 1805}
1804void KOMonthView::resizeEvent(QResizeEvent * e) 1806void KOMonthView::resizeEvent(QResizeEvent * e)
1805{ 1807{
1806 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); 1808 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
1807 if ( isVisible() ) { 1809 if ( isVisible() ) {
1808 //qDebug("KOMonthView::isVisible "); 1810 //qDebug("KOMonthView::isVisible ");
1809 slotComputeLayout(); 1811 slotComputeLayout();
@@ -1811,17 +1813,17 @@ void KOMonthView::resizeEvent(QResizeEvent * e)
1811 mComputeLayoutTimer->start( 100 ); 1813 mComputeLayoutTimer->start( 100 );
1812} 1814}
1813 1815
1814void KOMonthView::slotComputeLayout() 1816void KOMonthView::slotComputeLayout()
1815{ 1817{
1816 mComputeLayoutTimer->stop(); 1818 mComputeLayoutTimer->stop();
1817 //qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); 1819 //qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() );
1818 computeLayout(); 1820 computeLayout();
1819 clPending = true; 1821 clPending = true;
1820 setKeyBFocus(); 1822 setKeyBFocus();
1821} 1823}
1822void KOMonthView::computeLayoutWeek() 1824void KOMonthView::computeLayoutWeek()
1823{ 1825{
1824 static int lastWid = 0; 1826 static int lastWid = 0;
1825 static int lastHei = 0; 1827 static int lastHei = 0;
1826 int daysToShow; 1828 int daysToShow;
1827 bool combinedSatSun = false; 1829 bool combinedSatSun = false;