Repository navigation
Fix DXF import layer transparency - #67999
Merged
nyalldawson merged 1 commit intoOct 29, 2026
Merged
Conversation
This fixes random layer-level transparency and, as a result, random alpha channel value when importing DXF without 440 layer attribute. In-tree libdxfrw supports layer-level transparency but fails to initialize the corresponding field with default value. When no transparency code is encountered in DXF file, the importer uses unspecified value through the whole process, translating into effectively random layer and entity alpha channel value.
nyalldawson
approved these changes
Oct 28, 2026
Contributor
🍎 MacOS Qt6 buildsDownload MacOS Qt6 builds of this PR for testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes random layer-level transparency and, as a result, random alpha channel value when importing DXF without
440layer attribute.In-tree libdxfrw supports layer-level transparency but fails to initialize the corresponding field with default value. When no
transparency code is encountered in DXF file, the importer uses unspecified value through the whole process, translating into
effectively random layer and entity alpha channel value.
This problem can be observed on gcc Linux build importing DXF created by LibreCad:
Note that
1006749280is clearly invalid value for transparency attribute, which should be within 0-255 range.No LLM, AI or agent assisted code contributions are allowed in the QGIS repository. If we subsequently discover that you have used an AI, LLM, or any agent-based workflow for your contribution, you will be subject to code reversion and contributor rights sanctioning. See QEP 408 for details.