Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labeling Settings window's width expand beyond reason when a large expression is used #19395

Closed
qgib opened this issue Aug 14, 2014 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience High Priority
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Aug 14, 2014

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 11061
Affected QGIS version: master
Redmine category:gui


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.


@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2014

Author Name: Arnaud Morvan (@arnaud-morvan)


Tested on master with Ubuntu 14.04, works good, not expanding.

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2014

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


Arnaud, screenshot please? :)

The label must be a long expression string.

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2014

Author Name: Giovanni Manghi (@gioman)


I tested also on Windows/master, it works as expected too.


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed
  • 7884 was configured as labels.png

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2014

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


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.

  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2014

Author Name: Giovanni Manghi (@gioman)


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.


  • resolution was changed from fixed/implemented to
  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2014

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


I'm at lost here :)

I've made a screencast of how the UI behaves over here, hope that can help.


  • 7885 was configured as bug.mp4

  • bug.mp4 (Mathieu Pellerin - nIRV)

@qgib
Copy link
Contributor Author

qgib commented Oct 4, 2014

Author Name: Salvatore Larosa (@slarosa)


Fixed in changeset "def0a1df91d5390f02dc0fd5f17d3614e396a7a2".


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority GUI/UX Related to QGIS application GUI or User Experience labels May 25, 2019
@qgib qgib added this to the Version 2.6 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience High Priority
Projects
None yet
Development

No branches or pull requests

1 participant