-rw-r--r-- | core/pim/todo/tableview.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index f4b898f..34b8b3c 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -128,4 +128,6 @@ void TableView::showOverDue( bool ) { void TableView::updateView( ) { + qWarning("update view"); m_row = false; - startTimer( 2000 ); + static int id; + id = startTimer(2000 ); /* FIXME we want one page to be read! @@ -150,2 +152,4 @@ void TableView::updateView( ) { setNumRows( it.count() ); + if ( it.count() == 0 ) + killTimer(id); int elc = time.elapsed(); @@ -164,9 +168,8 @@ void TableView::setTodo( int, const OTodo&) { /* repaint */ - QTable::update(); + repaint(); } void TableView::addEvent( const OTodo&) { - sort(); /* fix problems of not showing the 'Haken' */ - QTable::repaint(); + updateView(); } @@ -430,2 +433,5 @@ void TableView::slotPriority() { void TableView::timerEvent( QTimerEvent* ev ) { + if (sorted().count() == 0 ) + return; + int row = currentRow(); |