[Qgis-developer] Expression based labeling

Nathan Woodrow madmanwoo at gmail.com
Thu Oct 27 17:24:54 EDT 2011


Ok pull request sent with a patch for the missing preview output and to
enable multiline labels by default.  Enabled multiline by default because
users seem to struggle to get multiline working unless that feature is told
to them.

- Nathan

On Thu, Oct 27, 2011 at 10:46 PM, Martin Dobias <wonder.sk at gmail.com> wrote:

> On Thu, Oct 27, 2011 at 5:28 AM, Nathan Woodrow <madmanwoo at gmail.com>
> wrote:
> > Thanks Andreas. Glad you like it.
> >>> Question 1: the output preview of the label does not seem to work when
> I
> >>> use a field - is there something I need to >>do to enable it? I would
> expect
> >>> it to pull in the first record or some random record to retrieve
> values?
> >
> > Ah yes there seems to be a bug with grabbing the first record with some
> data
> > sources.  I get the top feature using layer.featureAt(0) but for some
> reason
> > not all providers return a record at this index.  Writing a patch now.
>
> That is because not all data providers use ids in interval [0,N-1].
> For example, postgres provider uses the column with primary key as ID
> - so the values may be arbitrary. It is better to do a select()
> followed by just one nextFeature().
>
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20111028/4772956d/attachment.html


More information about the Qgis-developer mailing list