Fix random error when remove word from bookmark. Fix show all bookmark feature.
[mdictionary] / src / mdictionary / gui / WordListWidget.cpp
index 135e4ae..da98e15 100644 (file)
@@ -35,6 +35,8 @@
 WordListWidget::WordListWidget(QWidget *parent):
     QTreeView(parent) {
 
+    isBookmarkModeActive = false;
+
     //creating new model to store words and stars
 #ifdef Q_WS_MAEMO_5
     model = new QStandardItemModel(this);
@@ -187,6 +189,9 @@ void WordListWidget::showSearchResults(
     if (listModel == 0){
         listModel = new WordListModel(this);
     }
+
+    listModel->setBookmarkModeActive(isBookmarkModeActive);
+    isBookmarkModeActive = false;
     listModel->setTranslations(result, wordsInBookmarks);
 
 #endif
@@ -341,3 +346,7 @@ void WordListWidget::clear() {
     }
     searchResult.clear();
 }
+
+void WordListWidget::bookmarkModeActive(){
+    isBookmarkModeActive = true;
+}