TextEditor: fix folding of all nested blocks of folded block

Now all sub-blocks of folded block don`t became folded too when we add
new blocks in document

Change-Id: Id347d99195d2835a1de46a397175ff9fa68bb1ae
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Anatoly Stolbov
2016-05-04 17:28:04 +03:00
committed by David Schulz
parent 8daaa2f651
commit 369b46ee68

View File

@@ -659,6 +659,7 @@ void TextDocumentLayout::FoldValidator::process(QTextBlock block)
&& !TextDocumentLayout::canFold(previous))
|| (!TextDocumentLayout::isFolded(previous)
&& TextDocumentLayout::canFold(previous)
&& previous.isVisible()
&& !block.isVisible())) {
TextDocumentLayout::setFolded(previous, !TextDocumentLayout::isFolded(previous));
}