Commit 7591fc71 authored by Alessandro Portale's avatar Alessandro Portale

Git: Remove unneeded painter state save/restore

The QPainter::drawPixmap call does not modify the painter state.

Change-Id: I1cbae43e6531c9e3d2ae2d3cd1c2d77ce23c4c52
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent a3c0f0f6
......@@ -291,9 +291,7 @@ void IconItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
QStyleOptionViewItem o = option;
if (index.column() == 0 && hasIcon(index.row())) {
const QSize size = option.decorationSize;
painter->save();
painter->drawPixmap(o.rect.x(), o.rect.y(), m_icon.pixmap(size.width(), size.height()));
painter->restore();
o.rect.setLeft(size.width());
}
QStyledItemDelegate::paint(painter, o, index);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment