forked from qt-creator/qt-creator
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:
committed by
David Schulz
parent
8daaa2f651
commit
369b46ee68
@@ -659,6 +659,7 @@ void TextDocumentLayout::FoldValidator::process(QTextBlock block)
|
|||||||
&& !TextDocumentLayout::canFold(previous))
|
&& !TextDocumentLayout::canFold(previous))
|
||||||
|| (!TextDocumentLayout::isFolded(previous)
|
|| (!TextDocumentLayout::isFolded(previous)
|
||||||
&& TextDocumentLayout::canFold(previous)
|
&& TextDocumentLayout::canFold(previous)
|
||||||
|
&& previous.isVisible()
|
||||||
&& !block.isVisible())) {
|
&& !block.isVisible())) {
|
||||||
TextDocumentLayout::setFolded(previous, !TextDocumentLayout::isFolded(previous));
|
TextDocumentLayout::setFolded(previous, !TextDocumentLayout::isFolded(previous));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user