ui: adapt scroll target value in code single file mode as workaround when view scrolls below last line

This commit is contained in:
Eberhard Graether
2018-04-21 04:30:55 +02:00
parent fe38cfff6a
commit 91b4e80384
4 changed files with 21 additions and 2 deletions
+5
View File
@@ -130,6 +130,11 @@ uint QtCodeField::getEndLineNumber() const
return m_startLineNumber + blockCount() - 1;
}
int QtCodeField::totalLineHeight() const
{
return blockBoundingRect(firstVisibleBlock()).height() * blockCount();
}
std::string QtCodeField::getCode() const
{
return m_code;