From: Frederik Gladhorn Date: Sat, 1 Mar 2008 10:17:57 +0000 (+0000) Subject: When changing the text of a translation, only change the text, not reset all it's... X-Git-Tag: v4.0.3~3 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=9f56a17a228f65cd6682334ac324bc95214b53fb;p=libqmvoc.git When changing the text of a translation, only change the text, not reset all it's other properties like conjugations. BUG: 158459 svn path=/branches/KDE/4.0/kdeedu/libkdeedu/; revision=780834 --- diff --git a/keduvocdocument/keduvocexpression.cpp b/keduvocdocument/keduvocexpression.cpp index 0565555..0c6898f 100644 --- a/keduvocdocument/keduvocexpression.cpp +++ b/keduvocdocument/keduvocexpression.cpp @@ -107,7 +107,8 @@ void KEduVocExpression::setTranslation( int index, const QString & expr ) return; } - d->m_translations[index] = expr.simplified(); + // if it exists already, only change the text, not the whole show! + d->m_translations[index].setText(expr.simplified()); } diff --git a/keduvocdocument/keduvoctranslation.h b/keduvocdocument/keduvoctranslation.h index 174e89b..886da49 100644 --- a/keduvocdocument/keduvoctranslation.h +++ b/keduvocdocument/keduvoctranslation.h @@ -42,7 +42,7 @@ public: * Constructor * @param translation is used as translation */ - KEduVocTranslation( const QString &translation ); + explicit KEduVocTranslation( const QString &translation ); /** copy constructor for d-pointer safet */ KEduVocTranslation( const KEduVocTranslation &other );