Bug report #11061
Labeling Settings window's width expand beyond reason when a large expression is used
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19395 |
Description
The labeling settings window's width expands to the width of the monitor when a large expression is used as label. What I think happens is that the expression widget's text input tries to grow to display the expression string as much as it can. That's not a bad idea, but the end result is really bad for very long strings (which happens as soon as you add a few conditional statements in there). There should be a reasonable growth limit that prevents the window from filling the monitor's width.
See attached screenshot. Problem started in the late stage of QGIS 2.4 development, and currently affects master too.
Setting priority to high as it is very problematic on small monitors.
Associated revisions
History
#1 Updated by Arnaud Morvan about 10 years ago
Tested on master with Ubuntu 14.04, works good, not expanding.
#2 Updated by Mathieu Pellerin - nIRV about 10 years ago
Arnaud, screenshot please? :)
The label must be a long expression string.
#3 Updated by Giovanni Manghi about 10 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
- File labels.png added
I tested also on Windows/master, it works as expected too.
#4 Updated by Mathieu Pellerin - nIRV about 10 years ago
- Status changed from Closed to Reopened
Definitively not fixed. Steps to reproduce:
1. Create a project, add one vector layer (polygon, point, line, doesn't matter)
2. Open the Layer Properties window, and go in the label section
3. Activate the label checkbox and paste the following expression as label: CASE WHEN 1 = 1 THEN 'insert a label, make this expression long' ELSE 'insert a different label, not fixed' END
4. Close the Layer Properties window to apply the label
5. Re-open the Layer Properties window, see how its width as grown to unreasonable size. It can't be reduced in size either.
#5 Updated by Giovanni Manghi about 10 years ago
- Resolution deleted (
fixed/implemented) - Status changed from Reopened to Feedback
Mathieu Pellerin - nIRV wrote:
Definitively not fixed. Steps to reproduce:
1. Create a project, add one vector layer (polygon, point, line, doesn't matter)
2. Open the Layer Properties window, and go in the label section
3. Activate the label checkbox and paste the following expression as label: CASE WHEN 1 = 1 THEN 'insert a label, make this expression long' ELSE 'insert a different label, not fixed' END
4. Close the Layer Properties window to apply the label
5. Re-open the Layer Properties window, see how its width as grown to unreasonable size. It can't be reduced in size either.
I tested again on latest qgis master (on Windows and Linux), made the expression very long, and on reopening the vector layer properties the dialog stays at an acceptable size. I will post a cast.
#6 Updated by Mathieu Pellerin - nIRV about 10 years ago
- File bug.mp4 added
I'm at lost here :)
I've made a screencast of how the UI behaves over here, hope that can help.
#7 Updated by Salvatore Larosa about 10 years ago
- Status changed from Feedback to Closed
Fixed in changeset def0a1df91d5390f02dc0fd5f17d3614e396a7a2.