Bug report #19101

Scale bar in Layout always opens at height of 11.9 mm

Added by Patrick Dunford about 6 years ago. Updated about 5 years ago.

Category:Map Composer/Printing
Affected QGIS version:3.4.6 Regression?:Yes
Operating System:Ubuntu 18.04 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26931


On my print composer (Layout as it is now called) the scale bar was set at a height of 7.1 mm at the bottom of the page. This size never changed in the 2.18 print composer. Now in 3.0, each time I open this layout, the scale bar always opens to a height of 11.9 mm.

scalebar_size.qgz (4.6 KB) Raymond Nijssen, 2018-11-09 07:17 AM

Numeric_Scale_Bar_Height_Issue2.qpt - Scale bar height is set to 7 mm in this .qpt layout template, but it will not be 7 mm when added to a qgis project file (5.41 KB) Steve Lowman, 2019-01-03 06:17 PM


#1 Updated by Nyall Dawson over 5 years ago

  • Status changed from Open to Feedback

Can you share an example project?

#2 Updated by Raymond Nijssen over 5 years ago

Nyall Dawson wrote:

Can you share an example project?

Attached project has a layout with a numeric scalebar with bounding box set to the guides (40x5mm). After reloading the project, the scalebar's width and height are changed (to 13.889x12.000mm).

#3 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open

#4 Updated by Steve Lowman over 5 years ago

In Line 49 of the attached "Numeric_Scale_Bar_Height_Issue.qpt", there is a numeric scale bar defined with size="16.1,7,mm". This should mean the height is 7mm, but when you add this into a QGIS 3 project, the numeric scale bar height is changed to 12.2 mm.

I have not tested every type of scale bar, but this seems to be a consistent issue with the numeric ones.

In a new .qgs file, do the following:

1. Add a new scale bar
2. Change it to Numeric
3. Change the height to 7 mm
4. Save the .qpt template
5. Close the Layout
6. Add the saved .qpt template
7. Observe the numeric scale bar height (will be increased from 7, possibly to 12.2)
8. The .qpt code still says 7 mm, but the QGIS 3 layout window is ignoring or misreading this.

#5 Updated by Steve Lowman over 5 years ago

I suggest that Regression should be set to 'Yes' for this one, because it was not an issue in QGIS 2.18, but it is in QGIS 3.4.
Also, I can confirm it is still an issue in 3.4.5, and it is not specific to Ubuntu, as I am finding it also in Windows 10.
Perhaps also, the bug report title may be a bit too precise. I think it seems to generally be greater height than you set it to, but not necessarily 11.9 mm.

#6 Updated by Giovanni Manghi over 5 years ago

  • Priority changed from Normal to High
  • Affected QGIS version changed from 3.4.0 to 3.4.5
  • Regression? changed from No to Yes

#7 Updated by Steve Lowman about 5 years ago

I confirm this is still a bug in QGIS 3.4.6.

#8 Updated by Giovanni Manghi about 5 years ago

  • Affected QGIS version changed from 3.4.5 to 3.4.6

Also available in: Atom PDF