Skip to content

fix: do not use Enum as default value which causes the plugin to fail after reloading#128

Merged
suricactus merged 1 commit intomasterfrom
fix_default
Sep 9, 2025
Merged

fix: do not use Enum as default value which causes the plugin to fail after reloading#128
suricactus merged 1 commit intomasterfrom
fix_default

Conversation

@suricactus
Copy link
Copy Markdown
Collaborator

NOTE: while it will be much more readable to pass export_type parameter to have a default value of ExportType.Cable, we cannot reference an Enum as a default value in a QGIS plugin, as when the file reloaded (e.g. enable/disable the plugin, Plugin reloader), the enum will have a different address and comparisons will fail.

… after reloading

NOTE: while it will be much more readable to pass `export_type` parameter to have a default value of `ExportType.Cable`,
we cannot reference an Enum as a default value in a QGIS plugin, as when the file reloaded (e.g. enable/disable the plugin, Plugin reloader),
the enum will have a different address and comparisons will fail.
@suricactus suricactus merged commit 6285396 into master Sep 9, 2025
6 checks passed
@suricactus suricactus deleted the fix_default branch September 9, 2025 15:39
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.

1 participant