From ee6fdf8783f7a2fa91792e2f0ce0f8350f8cac0d Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 28 Apr 2002 08:46:50 +0000 Subject: Patch from Stefan Eilers to raise the Tablewidget when searching and finding ;) --- (limited to 'core/pim') diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index d3f4cb4..a28fc3e 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -424,6 +424,7 @@ void TodoWindow::showCompleted( bool s ) table->setPaintingEnabled( false ); table->setShowCompleted( s ); table->setPaintingEnabled( true ); + mStack->raiseWidget( 1 ); } void TodoWindow::currentEntryChanged( int r, int ) @@ -545,6 +546,7 @@ void TodoWindow::closeEvent( QCloseEvent *e ) void TodoWindow::slotFind() { // put everything back to view all for searching... + mStack->raiseWidget( 1 ); if ( !catMenu->isItemChecked( 0 ) ) setCategory( 0 ); diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 753c036..dc60cc4 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp @@ -598,7 +598,8 @@ void TodoTable::loadFile( const QString &/*we use the standard*/ ) ToDoDB todoDB; QValueList vaList = todoDB.rawToDos(); for(QValueList::ConstIterator it = vaList.begin(); it != vaList.end(); ++it ){ - list.append( new ToDoEvent( (*it) ) ); + ToDoEvent *event = new ToDoEvent( (*it) ); + list.append( event ); } vaList.clear(); // qDebug("parsing done=%d", t.elapsed() ); @@ -640,8 +641,8 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row ) if (showDeadl){ static_cast(item(row,3))->setToDoEvent(&todo ); } - - todoList.insert( static_cast(item(row,0)), new ToDoEvent(todo) ); + ToDoEvent *ev = new ToDoEvent( todo ); + todoList.insert( static_cast(item(row,0)), new ToDoEvent(ev) ); } } -- cgit v0.9.0.2