Event treeWidget fixed properly

This commit is contained in:
Mark Watkins 2011-06-27 20:55:55 +10:00
parent 263b38749e
commit 79bd4946cf
2 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,7 @@ void DrawText(gGraphWindow & wid, QString text, int x, int y, float angle, QCol
glDisable(GL_DEPTH_TEST);
glFlush();
QPainter painter(&wid);
//painter.setFont(*font);
painter.setFont(*font);
painter.setPen(Qt::black);
painter.setOpacity(1);
// painter.setCompositionMode(QPainter::CompositionMode_);

View File

@ -303,8 +303,9 @@ void Daily::on_calendar_currentPageChanged(int year, int month)
}
void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
{
if (!day) return;
tree->clear();
if (!day) return;
tree->setColumnCount(1); // 1 visible common.. (1 hidden)
QTreeWidgetItem *root=NULL;//new QTreeWidgetItem((QTreeWidget *)0,QStringList("Stuff"));
@ -785,6 +786,7 @@ void Daily::RedrawGraphs()
void Daily::on_treeWidget_itemSelectionChanged()
{
if (ui->treeWidget->selectedItems().size()==0) return;
QTreeWidgetItem *item=ui->treeWidget->selectedItems().at(0);
if (!item) return;
QDateTime d;