Bug report #14963

Label Formatting - Wrap on character with "wordwrap"

Added by Burghardt Scholle over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:Labelling
Affected QGIS version:2.14.3 Regression?:No
Operating System:Ubuntu / Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:22912

Description

Hi all,

my System: Ubuntu 14.04 / Windows 7 64bit, QGIS 2.14.3 / QGIS Master

I want label a layer with long attribute values. The label should wrap after a number of characters. For this I use the function "wordwarp" in the expression string builder (e.g. "wordwrap('name', 15)"). In the output preview the wordwrap is displayed correctly (see attached screenshot). But in the map the wordwrap will not be displayed. I add demo data.

Regards
Burghardt

LabelWordwrapDemo.zip (14.8 KB) Burghardt Scholle, 2016-06-07 05:01 AM

wordwrap_2.zip (65.6 KB) Burghardt Scholle, 2016-06-13 11:11 PM

History

#1 Updated by Burghardt Scholle over 4 years ago

Hi,
sorry for the forgotten upload. Here are the demo files.
Regards
Burghardt

#2 Updated by Nyall Dawson over 4 years ago

  • Status changed from Open to Feedback

Works fine here:
1. load attached project
2. change label expression to wordwrap("name", 15)
3. labels show correctly as wrapped

Can you retest or post extra steps to reproduce please!

#3 Updated by Burghardt Scholle over 4 years ago

I'm very confused .-(. It does not work for me furthermore. I also use the current master version with Windows 7 (code revision f1ec121). I did my tests on several computers (W7, Ubuntu 14.04). I must be doing something wrong. Are my settings correct (see attached screenshot)?

#4 Updated by Nyall Dawson over 4 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Ah - i see the issue. Don't enter the expression as a data defined wrap character, that's a totally different thing. Instead just enter it in the "label with" box.

#5 Updated by Burghardt Scholle over 4 years ago

Oh my god - I am ashamed. You are right. I already thought that I have misunderstood something. Thank you very much for the valuable tip.
Regards
Burghardt

Also available in: Atom PDF