Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
22ebc746
Commit
22ebc746
authored
Aug 22, 2014
by
Don Gagne
Browse files
QImage creations fails causing QPainter to fail
Need to check for QImage failure otherwise it will through a qWarning.
parent
5221c66e
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs/opmapcontrol/src/mapwidget/mapgraphicitem.cpp
View file @
22ebc746
...
...
@@ -133,13 +133,15 @@ namespace mapcontrol
temp
=
QImage
(
size
,
QImage
::
Format_ARGB32_Premultiplied
);
temp
.
fill
(
0
);
QPainter
imagePainter
(
&
temp
);
imagePainter
.
translate
(
-
boundingRect
().
topLeft
());
imagePainter
.
scale
(
2
*
zoomdiff
,
2
*
zoomdiff
);
paintImage
(
&
imagePainter
);
imagePainter
.
end
();
lastimagepoint
=
Point
(
core
->
GetrenderOffset
().
X
()
*
2
*
zoomdiff
,
core
->
GetrenderOffset
().
Y
()
*
2
*
zoomdiff
);
lastimage
=
temp
;
if
(
!
temp
.
isNull
())
{
QPainter
imagePainter
(
&
temp
);
imagePainter
.
translate
(
-
boundingRect
().
topLeft
());
imagePainter
.
scale
(
2
*
zoomdiff
,
2
*
zoomdiff
);
paintImage
(
&
imagePainter
);
imagePainter
.
end
();
lastimagepoint
=
Point
(
core
->
GetrenderOffset
().
X
()
*
2
*
zoomdiff
,
core
->
GetrenderOffset
().
Y
()
*
2
*
zoomdiff
);
lastimage
=
temp
;
}
}
void
MapGraphicItem
::
paintImage
(
QPainter
*
painter
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment