-rw-r--r-- | core/pim/todo/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 7e7d2f7..48954ce 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -250,79 +250,79 @@ void MainWindow::connectBase( ViewBase* base) { base->connectUpdateView( this, SLOT(slotUpdate3( QWidget* ) ) ) ; base->connectRemove(&m_todoMgr, SLOT(remove(int)) ); } QPopupMenu* MainWindow::contextMenu( int uid ) { QPopupMenu* menu = new QPopupMenu(); m_editAction->addTo( menu ); m_deleteAction->addTo( menu ); m_duplicateAction->addTo( menu ); menu->insertSeparator(); return menu; } QPopupMenu* MainWindow::options() { qWarning("Options"); return m_options; } QPopupMenu* MainWindow::edit() { return m_edit; } QPopupMenu* MainWindow::view() { return m_view; } QToolBar* MainWindow::toolbar() { return m_tool; } OTodoAccess::List MainWindow::list()const { return m_todoMgr.list(); } OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) { int cat = 0; - if ( m_curCat == tr("All Categories") ) + if ( m_curCat != tr("All Categories") ) cat = currentCatId(); int filter = 1; if (!m_completed ) filter |= 4; if (m_overdue) filter |= 2; return m_todoMgr.sorted( asc, sortOrder, filter, cat ); } OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) { int cat = 0; - if ( m_curCat == tr("All Categories") ) + if ( m_curCat != tr("All Categories") ) cat = currentCatId(); return m_todoMgr.sorted(asc, sortOrder, addFilter, cat ); } OTodo MainWindow::event( int uid ) { return m_todoMgr.event( uid ); } bool MainWindow::isSyncing()const { return m_syncing; } TemplateManager* MainWindow::templateManager() { return m_tempManager; } Editor* MainWindow::currentEditor() { return m_curEdit; } TodoShow* MainWindow::currentShow() { return m_curShow; } void MainWindow::slotReload() { m_todoMgr.reload(); currentView()->updateView( ); raiseCurrentView(); } void MainWindow::closeEvent( QCloseEvent* e ) { if (m_stack->visibleWidget() == currentShow()->widget() ) { raiseCurrentView(); e->ignore(); return; } /* * we should have flushed and now we're still saving |