From 61f8e6e0831b7d0bceea331ff47059a6ed9926a0 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 17 Sep 2012 19:20:46 +0200 Subject: [PATCH] Do not take into account the translation we are removing when finding words of this type --- keduvocdocument/keduvocwordtype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keduvocdocument/keduvocwordtype.cpp b/keduvocdocument/keduvocwordtype.cpp index 87aeebb..8539bad 100644 --- a/keduvocdocument/keduvocwordtype.cpp +++ b/keduvocdocument/keduvocwordtype.cpp @@ -89,10 +89,10 @@ void KEduVocWordType::removeTranslation(KEduVocTranslation* translation) } } - // remove from cache + // remove from cache if none of the translations use this word type (other than the one we are removing that should not be taken into account) bool found = false; foreach(int i, translation->entry()->translationIndices()) { - if (translation->entry()->translation(i)->wordType() && translation->entry()->translation(i)->wordType() == this) { + if (translation->entry()->translation(i)->wordType() && translation->entry()->translation(i)->wordType() == this && translation->entry()->translation(i) != translation) { found = true; break; } -- 2.47.3