Skip to content

Commit

Permalink
Fix move label tool with PostGIS (similar problem as #9148)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 11, 2014
1 parent 863a83b commit df85395
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsmaptoollabel.cpp
Expand Up @@ -480,8 +480,10 @@ bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, const QgsFeat
}

const QgsAttributes& attributes = f.attributes();
x = attributes[xCol].toDouble( &xSuccess );
y = attributes[yCol].toDouble( &ySuccess );
if ( !attributes[xCol].isNull() )
x = attributes[xCol].toDouble( &xSuccess );
if ( !attributes[yCol].isNull() )
y = attributes[yCol].toDouble( &ySuccess );

return true;
}
Expand Down

0 comments on commit df85395

Please sign in to comment.