forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user