--- a/notes/notesui/notesviews/src/notescollectionview.cpp Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notescollectionview.cpp Tue Jul 06 14:14:56 2010 +0300
@@ -252,6 +252,8 @@
// Cleanup.
mNotesEditor->deleteLater();
+
+ mAppControllerIf->switchToView(NotesNamespace::NotesMainViewId);
}
/*!
@@ -334,14 +336,18 @@
Q_UNUSED(index)
Q_UNUSED(start)
Q_UNUSED(end)
-
- // Update the count of notes in the view.
- QString countString(hbTrId("txt_notes_list_note_count"));
- QModelIndex mdlIndex = mListView->model()->index(1, 0);
- QStringList favStringList;
- favStringList.append(hbTrId("txt_notes_list_favorites"));
- favStringList.append(countString.arg(mFavouriteModel->rowCount()));
- mListView->model()->setData(mdlIndex, favStringList, Qt::DisplayRole);
+
+ // Check model is set for mListView before update
+ if( mListView->model())
+ {
+ // Update the count of notes in the view.
+ QString countString(hbTrId("txt_notes_list_note_count"));
+ QModelIndex mdlIndex = mListView->model()->index(1, 0);
+ QStringList favStringList;
+ favStringList.append(hbTrId("txt_notes_list_favorites"));
+ favStringList.append(countString.arg(mFavouriteModel->rowCount()));
+ mListView->model()->setData(mdlIndex, favStringList, Qt::DisplayRole);
+ }
}
/*!