Skip to content

Fix/issue 865 create action disabled#910

Merged
MarcelGeo merged 2 commits into
masterfrom
fix/issue-865-create-action-disabled
May 13, 2026
Merged

Fix/issue 865 create action disabled#910
MarcelGeo merged 2 commits into
masterfrom
fix/issue-865-create-action-disabled

Conversation

@harminius
Copy link
Copy Markdown
Contributor

Summary

Fixes #865 - at the QGIS welcome screen with no project open, the "Create Mergin Maps Project" toolbar action stays disabled. Opening any project (then optionally closing it) is required to get it to wake up.

Root cause

enable_toolbar_actions (Mergin/plugin.py:291-303) already has the correct special case for the Create button — it should be enabled whenever self.mc and self.manager are both set,
regardless of whether a project is open. The bug is that create_manager() never calls enable_toolbar_actions() after populating self.mc/self.manager at startup. Other state-change paths
(on_config_changed, on_qgis_project_changed) do, but the initial-load path does not — so on a clean QGIS launch the Create button stays at its initial enabled=False state until on_qgis_project_changed fires (i.e. a project is opened).

Fix

One line - call self.enable_toolbar_actions() at the end of create_manager(). The existing mc/manager check then enables the Create button at startup with no project required. The call is idempotent, and the same function is already invoked from the other state-change paths, so there is no behavioural risk elsewhere (the only side effect is a slightly redundant second call from on_config_changed, which is harmless).

image

@harminius harminius requested a review from MarcelGeo May 12, 2026 11:23
@MarcelGeo MarcelGeo merged commit 7c3d0c4 into master May 13, 2026
11 checks passed
@MarcelGeo MarcelGeo deleted the fix/issue-865-create-action-disabled branch May 13, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't create new default project when no project is open

2 participants