ui: clear button in logtab

<description>
This commit is contained in:
Andreas Stallinger
2016-11-14 14:57:56 +01:00
parent 56ab09159b
commit 98573fc6fd
4 changed files with 31 additions and 3 deletions
+13
View File
@@ -79,6 +79,19 @@ void QtTable::updateRows()
verticalHeader()->setStyleSheet("::section { width: " + QString::number(width) + "px; }");
verticalHeader()->setDefaultSectionSize(ApplicationSettings::getInstance()->getFontSize() + 6);
if (this->selectionModel()->hasSelection())
{
if (selectionModel()->selection().indexes()[0].row() >= model()->rowCount() - 2)
{
clearSelection();
showLastRow();
}
}
else
{
showLastRow();
}
}
int QtTable::getFilledRowCount()