Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 48954ce..c9c43d4 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -420,7 +420,6 @@ void MainWindow::slotNew() { | |||
420 | // but only call if we changed something -zecke | 420 | // but only call if we changed something -zecke |
421 | populateCategories(); | 421 | populateCategories(); |
422 | } | 422 | } |
423 | |||
424 | raiseCurrentView( ); | 423 | raiseCurrentView( ); |
425 | } | 424 | } |
426 | void MainWindow::slotDuplicate() { | 425 | void MainWindow::slotDuplicate() { |
@@ -497,6 +496,7 @@ void MainWindow::slotEdit() { | |||
497 | void MainWindow::setCategory( int c) { | 496 | void MainWindow::setCategory( int c) { |
498 | if ( c <= 0 ) return; | 497 | if ( c <= 0 ) return; |
499 | 498 | ||
499 | |||
500 | qWarning("Iterating over cats %d", c ); | 500 | qWarning("Iterating over cats %d", c ); |
501 | for ( unsigned int i = 1; i < m_catMenu->count(); i++ ) | 501 | for ( unsigned int i = 1; i < m_catMenu->count(); i++ ) |
502 | m_catMenu->setItemChecked(i, c == (int)i ); | 502 | m_catMenu->setItemChecked(i, c == (int)i ); |
@@ -513,6 +513,7 @@ void MainWindow::setCategory( int c) { | |||
513 | setCaption( tr("Todo") + " - " + m_curCat ); | 513 | setCaption( tr("Todo") + " - " + m_curCat ); |
514 | } | 514 | } |
515 | m_catMenu->setItemChecked( c, true ); | 515 | m_catMenu->setItemChecked( c, true ); |
516 | |||
516 | currentView()->setShowCategory( m_curCat ); | 517 | currentView()->setShowCategory( m_curCat ); |
517 | raiseCurrentView(); | 518 | raiseCurrentView(); |
518 | } | 519 | } |
@@ -549,8 +550,7 @@ void MainWindow::slotShowDetails() { | |||
549 | * Menu | 550 | * Menu |
550 | */ | 551 | */ |
551 | void MainWindow::populateCategories() { | 552 | void MainWindow::populateCategories() { |
552 | if (m_todoMgr.isLoaded() ) | 553 | m_todoMgr.load(); |
553 | m_todoMgr.load(); | ||
554 | 554 | ||
555 | m_catMenu->clear(); | 555 | m_catMenu->clear(); |
556 | int id, rememberId; | 556 | int id, rememberId; |
@@ -614,6 +614,7 @@ void MainWindow::slotEdit( int uid ) { | |||
614 | qWarning("Replacing now" ); | 614 | qWarning("Replacing now" ); |
615 | m_todoMgr.update( todo.uid(), todo ); | 615 | m_todoMgr.update( todo.uid(), todo ); |
616 | currentView()->replaceEvent( todo ); | 616 | currentView()->replaceEvent( todo ); |
617 | /* a Category might have changed */ | ||
617 | populateCategories(); | 618 | populateCategories(); |
618 | } | 619 | } |
619 | 620 | ||