Skip to content

Commit a838700

Browse files
committed
avoid warning messages on composer arrows without markers
1 parent b4b0155 commit a838700

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/composer/qgscomposerarrow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin
169169
QSvgRenderer r;
170170
if ( type == StartMarker )
171171
{
172-
if ( !r.load( mStartMarkerFile ) )
172+
if ( mStartMarkerFile.isEmpty() || !r.load( mStartMarkerFile ) )
173173
{
174174
return;
175175
}
176176
}
177177
else //end marker
178178
{
179-
if ( !r.load( mEndMarkerFile ) )
179+
if ( mEndMarkerFile.isEmpty() || !r.load( mEndMarkerFile ) )
180180
{
181181
return;
182182
}
@@ -215,7 +215,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin
215215
void QgsComposerArrow::setStartMarker( const QString& svgPath )
216216
{
217217
QSvgRenderer r;
218-
if ( !r.load( svgPath ) )
218+
if ( svgPath.isEmpty() || !r.load( svgPath ) )
219219
{
220220
return;
221221
// mStartArrowHeadHeight = 0;
@@ -231,7 +231,7 @@ void QgsComposerArrow::setStartMarker( const QString& svgPath )
231231
void QgsComposerArrow::setEndMarker( const QString& svgPath )
232232
{
233233
QSvgRenderer r;
234-
if ( !r.load( svgPath ) )
234+
if ( svgPath.isEmpty() || !r.load( svgPath ) )
235235
{
236236
return;
237237
// mStopArrowHeadHeight = 0;

0 commit comments

Comments
 (0)