summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenchar.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp
index b83b2a4..96a0502 100644
--- a/inputmethods/handwriting/qimpenchar.cpp
+++ b/inputmethods/handwriting/qimpenchar.cpp
@@ -344,2 +344,3 @@ bool QIMPenCharSet::load( const QString &fn, Domain d )
344 markDeleted( pc->character() ); // override system 344 markDeleted( pc->character() ); // override system
345 if ( !pc->testFlag( QIMPenChar::Deleted ) )
345 addChar( pc ); 346 addChar( pc );
@@ -379,4 +380,17 @@ bool QIMPenCharSet::save( Domain d )
379 QIMPenChar *pc = ci.current(); 380 QIMPenChar *pc = ci.current();
381/*
382 * If the Domain is System and the Char is marked System - OR
383 * the domain is User, the Char is User and it's not deleted - OR
384 * the domain is User, the Char is System and it is deleted - AND
385 * the character is not an automated Combined Character
386 *
387 * This is required to ensure that we don't save user defined chars that have been deleted, but
388 * we *DO* save System chars that have been deleted. There is still the issue of deleted combined
389 * chars but I'm not sure how to tackle that yet
390 *
391 */
392
380 if ( ( ( (d == System) && pc->testFlag( QIMPenChar::System ) ) || 393 if ( ( ( (d == System) && pc->testFlag( QIMPenChar::System ) ) ||
381 ( (d == User) && !pc->testFlag( QIMPenChar::System ) ) ) && 394 ( (d == User) && !pc->testFlag( QIMPenChar::System ) && !pc->testFlag( QIMPenChar::Deleted ) ) ||
395 ( (d == User) && pc->testFlag( QIMPenChar::System ) && pc->testFlag( QIMPenChar::Deleted ) ) ) &&
382 ( !pc->testFlag (QIMPenChar::Combined ) ) ) { 396 ( !pc->testFlag (QIMPenChar::Combined ) ) ) {