mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Save / Restore the QPainter before operations.
I don't know if this fixes anything, but it is asked of us to do that by the Qt docs. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
774a785a99
commit
d3c0a723b8
2 changed files with 12 additions and 0 deletions
|
@ -353,6 +353,7 @@ void ProfilePrintDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
const int row = index.row();
|
||||
const int col = index.column();
|
||||
|
||||
painter->save();
|
||||
// grid color
|
||||
painter->setPen(QPen(QColor(0xff999999)));
|
||||
// horizontal lines
|
||||
|
@ -366,6 +367,7 @@ void ProfilePrintDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
if (col == 4 || (col == 0 && row > 5))
|
||||
painter->drawLine(rect.topRight(), rect.bottomRight());
|
||||
}
|
||||
painter->restore();
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue