avoid warning messages on composer arrows without markers

This commit is contained in:
Juergen E. Fischer 2014-03-26 09:46:03 +01:00
parent b4b01550e4
commit a838700801

View File

@ -169,14 +169,14 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin
QSvgRenderer r;
if ( type == StartMarker )
{
if ( !r.load( mStartMarkerFile ) )
if ( mStartMarkerFile.isEmpty() || !r.load( mStartMarkerFile ) )
{
return;
}
}
else //end marker
{
if ( !r.load( mEndMarkerFile ) )
if ( mEndMarkerFile.isEmpty() || !r.load( mEndMarkerFile ) )
{
return;
}
@ -215,7 +215,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin
void QgsComposerArrow::setStartMarker( const QString& svgPath )
{
QSvgRenderer r;
if ( !r.load( svgPath ) )
if ( svgPath.isEmpty() || !r.load( svgPath ) )
{
return;
// mStartArrowHeadHeight = 0;
@ -231,7 +231,7 @@ void QgsComposerArrow::setStartMarker( const QString& svgPath )
void QgsComposerArrow::setEndMarker( const QString& svgPath )
{
QSvgRenderer r;
if ( !r.load( svgPath ) )
if ( svgPath.isEmpty() || !r.load( svgPath ) )
{
return;
// mStopArrowHeadHeight = 0;