Skip to content

Commit

Permalink
Fixed / Removed kludge for getting detailed widget capture to layout …
Browse files Browse the repository at this point in the history
…out by calling show() on it quickly first.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8483 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 21, 2008
1 parent dd03d02 commit e59d060
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gui/qgsdetaileditemdelegate.cpp
Expand Up @@ -54,7 +54,6 @@ void QgsDetailedItemDelegate::paint(QPainter * thepPainter,
mpWidget->setData(myData);
mpWidget->resize(theOption.rect.width(),mpWidget->height());
mpWidget->setAutoFillBackground(false);
mpWidget->show();
mpWidget->repaint();

if (theOption.state & QStyle::State_Selected)
Expand All @@ -71,8 +70,7 @@ void QgsDetailedItemDelegate::paint(QPainter * thepPainter,
myGradient.setColorAt(1, myColor2);
thepPainter->fillRect(theOption.rect, QBrush(myGradient));
}
QPixmap myPixmap(mpWidget->size());
mpWidget->render(&myPixmap);
QPixmap myPixmap = QPixmap::grabWidget(mpWidget);
thepPainter->drawPixmap(theOption.rect.x(),
theOption.rect.y(),
myPixmap);
Expand Down

0 comments on commit e59d060

Please sign in to comment.