Skip to content

Commit

Permalink
Fix for 3d table highlighting was off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
malcom2073 committed Nov 23, 2013
1 parent 5fa25bd commit 1a33f44
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions core/src/tableview3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1314,9 +1314,12 @@ void TableView3D::passDatalog(QVariantMap data)
{
if (!ui.tableWidget->item(lowerrow,highercolumn)->isSelected())
{
m_highlightItemList.append(QPair<int,int>(lowerrow,highercolumn));
ui.tableWidget->item(lowerrow,highercolumn)->setData(Qt::UserRole+1,true);
ui.tableWidget->item(lowerrow,highercolumn)->setData(Qt::UserRole+2,lowercolumnratio);
if (lowercolumnratio != uppercolumnratio)
{
}
//m_highlightItemList.append(QPair<int,int>(lowerrow,highercolumn));
//ui.tableWidget->item(lowerrow,highercolumn)->setData(Qt::UserRole+1,true);
//ui.tableWidget->item(lowerrow,highercolumn)->setData(Qt::UserRole+2,lowercolumnratio);
}
}

Expand All @@ -1325,9 +1328,9 @@ void TableView3D::passDatalog(QVariantMap data)
{
if (!ui.tableWidget->item(higherrow,highercolumn)->isSelected())
{
m_highlightItemList.append(QPair<int,int>(higherrow,highercolumn));
ui.tableWidget->item(higherrow,highercolumn)->setData(Qt::UserRole+1,true);
ui.tableWidget->item(higherrow,highercolumn)->setData(Qt::UserRole+2,uppercolumnratio);
//m_highlightItemList.append(QPair<int,int>(higherrow,highercolumn));
//ui.tableWidget->item(higherrow,highercolumn)->setData(Qt::UserRole+1,true);
//ui.tableWidget->item(higherrow,highercolumn)->setData(Qt::UserRole+2,uppercolumnratio);
}
}
/*if (ui.tableWidget->item(m_oldYLoc,m_oldXLoc))
Expand Down

0 comments on commit 1a33f44

Please sign in to comment.