Add folding to Side-by-side diff editor

Add folding for files and chunks.

Change-Id: I76476351e88f0b3e71e3cccbca0fa17b02c26226
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2017-10-11 14:14:10 +02:00
parent 8a2adfef6c
commit 96aeabd0a6
7 changed files with 160 additions and 9 deletions

View File

@@ -526,6 +526,13 @@ void TextDocumentLayout::setFolded(const QTextBlock &block, bool folded)
userData(block)->setFolded(true);
else if (TextBlockUserData *userData = testUserData(block))
userData->setFolded(false);
else
return;
TextDocumentLayout *layout = qobject_cast<TextDocumentLayout *>(
block.document()->documentLayout());
if (layout)
emit layout->foldChanged(block.blockNumber(), folded);
}
void TextDocumentLayout::requestExtraAreaUpdate()