diff options
Diffstat (limited to 'src/plugins/General/history/historywindow.cpp')
| -rw-r--r-- | src/plugins/General/history/historywindow.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/plugins/General/history/historywindow.cpp b/src/plugins/General/history/historywindow.cpp index bd139deed..cbd7439d2 100644 --- a/src/plugins/General/history/historywindow.cpp +++ b/src/plugins/General/history/historywindow.cpp @@ -125,16 +125,7 @@ void HistoryWindow::loadHistory() QString timeStr = dateTime.toLocalTime().toString(tr("hh:mm:ss")); int topLevelCount = m_ui->historyTreeWidget->topLevelItemCount(); - if(!topLevelCount) - { - m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem()); - m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr); - m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setFirstColumnSpanned(true); - m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setTextAlignment(0, Qt::AlignCenter); - m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setBackground(0, bgColor); - m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setForeground(0, textColor); - } - else if(m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr) + if(!topLevelCount || m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr) { m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem()); m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr); |
