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

Default layout manager templates not working #30064

Closed
m-kuhn opened this issue Jun 3, 2019 · 2 comments · Fixed by #30074
Closed

Default layout manager templates not working #30064

m-kuhn opened this issue Jun 3, 2019 · 2 comments · Fixed by #30074
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@m-kuhn
Copy link
Member

m-kuhn commented Jun 3, 2019

In the layout manager, there is a button "Open template directory -> Default".

This button points to a system directory (pkgDataPath/composer_templates) that is not created by the QGIS installation. If the button is clicked, an error message appears, that the directory does not exist and cannot be created.

I am not sure if this is a leftover (and nowhere used) or if it is intended to deploy organization-wide templates.

  • In the first case, it would be better to remove the button
  • In the second case, it would be better to
    • improve the error message and point to the documentation section on how to setup things properly
    • and/or move this to a different folder which is managed by the sysadmin (and not the application installation)

@nyalldawson I think you originally implemented this behavior, I'd be glad if you could shed some light

@m-kuhn m-kuhn added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jun 3, 2019
@nyalldawson
Copy link
Collaborator

@m-kuhn I didn't add this, so I'm not sure what the background to it is sorry.

I'd say for the "default" button we should either open the first folder specified under settings for layout templates, or if there's NONE, then disable the button.

@m-kuhn
Copy link
Member Author

m-kuhn commented Jun 4, 2019

I see, git blame didn't show the real origin because layouts is a copy of composer, it has its original roots here:
f41489a

@mhugent do you know if this is still in use somewhere and what's your opinion about the proposed change long term?

I am afraid of breaking workflows by doing this change now. Would you be ok with the following proposal

  1. If the pkgDataPath/ folder exists, open it
  2. If the pkgDataPath/composer_templates folder does not exist, but a first setting exists, open it
  3. If none of the folders exist, disable the button and set a tooltip pointing to settings
  4. Add a TODO for QGIS 4 to turn off the pkgDataPath behavior

m-kuhn added a commit to m-kuhn/QGIS that referenced this issue Jun 4, 2019
The "Default templates" button in the layout manager now

1. checks if there is a composer_templates folder in the app dir
2. if not, redirects to the first configured composer templates folder
3. if no composer templates folder is configured, it's deactivated

Fix qgis#30064
m-kuhn added a commit to m-kuhn/QGIS that referenced this issue Jun 4, 2019
The "Default templates" button in the layout manager now

1. checks if there is a composer_templates folder in the app dir
2. if not, redirects to the first configured composer templates folder
3. if no composer templates folder is configured, it's deactivated

Fix qgis#30064
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!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants