-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 ) { | |||
128 | void TableView::updateView( ) { | 128 | void TableView::updateView( ) { |
129 | qWarning("update view"); | ||
129 | m_row = false; | 130 | m_row = false; |
130 | startTimer( 2000 ); | 131 | static int id; |
132 | id = startTimer(2000 ); | ||
131 | /* FIXME we want one page to be read! | 133 | /* FIXME we want one page to be read! |
@@ -150,2 +152,4 @@ void TableView::updateView( ) { | |||
150 | setNumRows( it.count() ); | 152 | setNumRows( it.count() ); |
153 | if ( it.count() == 0 ) | ||
154 | killTimer(id); | ||
151 | int elc = time.elapsed(); | 155 | int elc = time.elapsed(); |
@@ -164,9 +168,8 @@ void TableView::setTodo( int, const OTodo&) { | |||
164 | /* repaint */ | 168 | /* repaint */ |
165 | QTable::update(); | 169 | repaint(); |
166 | } | 170 | } |
167 | void TableView::addEvent( const OTodo&) { | 171 | void TableView::addEvent( const OTodo&) { |
168 | sort(); | ||
169 | 172 | ||
170 | /* fix problems of not showing the 'Haken' */ | 173 | /* fix problems of not showing the 'Haken' */ |
171 | QTable::repaint(); | 174 | updateView(); |
172 | } | 175 | } |
@@ -430,2 +433,5 @@ void TableView::slotPriority() { | |||
430 | void TableView::timerEvent( QTimerEvent* ev ) { | 433 | void TableView::timerEvent( QTimerEvent* ev ) { |
434 | if (sorted().count() == 0 ) | ||
435 | return; | ||
436 | |||
431 | int row = currentRow(); | 437 | int row = currentRow(); |