Git: Remove unneeded painter state save/restore

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

Change-Id: I1cbae43e6531c9e3d2ae2d3cd1c2d77ce23c4c52
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2016-02-24 11:18:58 +01:00
parent a3c0f0f66a
commit 7591fc715c

View File

@@ -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);