1
0
Fork 0

GUI: fix really triggering misalignment of the comments column in TraceBrowser

This commit is contained in:
Duncan Ogilvie 2018-10-16 17:58:23 +02:00
parent 7d1b0f6f90
commit 98e509bb78
1 changed files with 5 additions and 4 deletions

View File

@ -348,6 +348,7 @@ NotDebuggingLabel:
case 4: //comments
{
int xinc = 3;
if(DbgIsDebugging())
{
//TODO: draw arguments
@ -372,8 +373,8 @@ NotDebuggingLabel:
if(width > w)
width = w;
if(width)
painter->fillRect(QRect(x, y, width, h), QBrush(backgroundColor)); //fill comment color
painter->drawText(QRect(x, y, width, h), Qt::AlignVCenter | Qt::AlignLeft, comment);
painter->fillRect(QRect(x + xinc, y, width, h), QBrush(backgroundColor)); //fill comment color
painter->drawText(QRect(x + xinc, y, width, h), Qt::AlignVCenter | Qt::AlignLeft, comment);
}
else if(DbgGetLabelAt(cur_addr, SEG_DEFAULT, label)) // label but no comment
{
@ -386,8 +387,8 @@ NotDebuggingLabel:
if(width > w)
width = w;
if(width)
painter->fillRect(QRect(x, y, width, h), QBrush(backgroundColor)); //fill comment color
painter->drawText(QRect(x, y, width, h), Qt::AlignVCenter | Qt::AlignLeft, labelText);
painter->fillRect(QRect(x + xinc, y, width, h), QBrush(backgroundColor)); //fill comment color
painter->drawText(QRect(x + xinc, y, width, h), Qt::AlignVCenter | Qt::AlignLeft, labelText);
}
}
return "";