Bug report #18686

[Layouts] Delete the map assigned to a scale bar item does not "invalidate" the scale bar

Added by Harrissou Santanna almost 6 years ago.

Category:Map Composer/Printing
Affected QGIS version:3.1(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 #:26574


I don't quite know what would be the right behavior but...
Create a map item and an associated scale bar.
Now, delete the map item
The scale bar still shows the same size but its "map" property is set to empty.
This could mislead people in case there's another map item in the page.

I don't know if the map property should be set to the "next" other map item in the layout page but this issue also might also concern:
  • map legend if i delete the map item
  • attribute table if the layer no longer exists (didn't check this one's behavior though)
  • or any data-defined item that makes use of another item properties (or variable)

Maybe we need to display something in the GUI to alert the user that a setting has been corrupted (or check whether the map item is not assigned and alert when trying to remove or ...)
OR maybe this should be a feature request.

Also available in: Atom PDF