Skip to content

Conversation

@kyamagu
Copy link
Contributor

@kyamagu kyamagu commented Nov 7, 2025

Summary

Fixes #513 - Group blend mode was incorrectly returning None when the section divider setting existed but had minimal content (e.g., blend_mode field was None).

The fix adds an additional check to ensure setting.blend_mode is not None before using it, falling back to the parent layer's blend_mode when it's not set.

Changes

  • Modified Group.blend_mode property in layers.py to check both setting is not None and setting.blend_mode is not None
  • Added test case test_group_blend_mode() to verify the fix
  • Added fixture PSD file with minimal section divider data for testing

Test plan

  • All existing tests pass (51 tests in test_layers.py)
  • New test verifies blend mode is not None with minimal section divider data
  • Test verifies blend mode can be read and written correctly

🤖 Generated with Claude Code

When a group's section divider setting exists but has minimal content (e.g., blend_mode is None), the blend_mode property was incorrectly returning None instead of falling back to the parent layer's blend_mode. This fix adds an additional check to ensure the setting's blend_mode is not None before using it.

Fixes #513

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@kyamagu kyamagu merged commit aafa7b6 into main Nov 7, 2025
7 checks passed
@kyamagu kyamagu deleted the fix/section-divider-blend branch November 7, 2025 00:35
@kyamagu kyamagu mentioned this pull request Nov 9, 2025
5 tasks
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.

Group layer with minimal SectionDividerSetting record produces None for blend_mode

2 participants