Commit 22ebc746 authored by Don Gagne's avatar Don Gagne

QImage creations fails causing QPainter to fail

Need to check for QImage failure otherwise it will through a qWarning.
parent 5221c66e
......@@ -133,6 +133,7 @@ namespace mapcontrol
temp=QImage(size,
QImage::Format_ARGB32_Premultiplied);
temp.fill(0);
if (!temp.isNull()) {
QPainter imagePainter(&temp);
imagePainter.translate(-boundingRect().topLeft());
imagePainter.scale(2*zoomdiff,2*zoomdiff);
......@@ -141,6 +142,7 @@ namespace mapcontrol
lastimagepoint=Point(core->GetrenderOffset().X()*2*zoomdiff,core->GetrenderOffset().Y()*2*zoomdiff);
lastimage=temp;
}
}
void MapGraphicItem::paintImage(QPainter *painter)
{
......
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