|
1 | | -/* Copyright (c) 2010-2016 Pavel Vondřička (Pavel.Vondricka@korpus.cz) |
2 | | - * Copyright (c) 2010-2016 Charles University in Prague, Faculty of Arts, |
| 1 | +/* Copyright (c) 2010-2017 Pavel Vondřička (Pavel.Vondricka@korpus.cz) |
| 2 | + * Copyright (c) 2010-2017 Charles University in Prague, Faculty of Arts, |
3 | 3 | * Institute of the Czech National Corpus |
4 | 4 | * |
5 | 5 | * This file is part of InterText Editor. |
@@ -646,13 +646,13 @@ bool ItAlignment::canSplitParent(aligned_doc doc, int pos, int el) { |
646 | 646 | return true; |
647 | 647 | } |
648 | 648 |
|
649 | | -bool ItAlignment::updateContents(aligned_doc doc, int pos, int el, QString string) |
| 649 | +bool ItAlignment::updateContents(aligned_doc doc, int pos, int el, QString string, bool forceupdate) |
650 | 650 | { |
651 | 651 | if (!ignorePermissions && ((doc==0 && !info.ver[0].perm_chtext) || (doc==1 && !info.ver[1].perm_chtext))) { |
652 | 652 | //qDebug() << "Permission denied."; |
653 | 653 | return false; |
654 | 654 | } |
655 | | - if (string==getContents(doc,pos,false).toStringList().at(el)) { |
| 655 | + if (!forceupdate && string==getContents(doc,pos,false).toStringList().at(el)) { |
656 | 656 | //qDebug() << "No change, no update."; |
657 | 657 | return true; |
658 | 658 | } |
@@ -755,7 +755,7 @@ bool ItAlignment::split(aligned_doc doc, int pos, int el, QStringList newstrings |
755 | 755 | newstrings[i] = newstrings[i].trimmed(); |
756 | 756 | fixBrokenTags(newstrings[i], &inherittags); |
757 | 757 | } |
758 | | - if (!updateContents(doc, pos, el, newstrings.takeFirst())) |
| 758 | + if (!updateContents(doc, pos, el, newstrings.takeFirst(),true)) |
759 | 759 | return false; |
760 | 760 | while (!newstrings.isEmpty()) |
761 | 761 | if (!duplicate(doc, pos, el++, newstrings.takeFirst())) |
|
0 commit comments