From: Albert Astals Cid Date: Mon, 17 Sep 2012 17:20:46 +0000 (+0200) Subject: Do not take into account the translation we are removing when finding words of this... X-Git-Tag: v4.9.2^0 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=refs%2Fremotes%2Fupstream%2FKDE%2F4.9;p=libqmvoc.git Do not take into account the translation we are removing when finding words of this type --- 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; }