Skip to content

class/Widget/geometry.c: Allow reconfiguring grid cells#143

Closed
HaraldJoerg wants to merge 1 commit intodk:masterfrom
HaraldJoerg:reconfigure_grid
Closed

class/Widget/geometry.c: Allow reconfiguring grid cells#143
HaraldJoerg wants to merge 1 commit intodk:masterfrom
HaraldJoerg:reconfigure_grid

Conversation

@HaraldJoerg
Copy link
Contributor

I just added a comment to commit 81d941c. This commit fixes the segfault for "mixed" widget configuration, but also prohibits calling grid_configure twice for the same cell. The docs say:

If any of the slaves are already managed by the geometry manager then any unspecified options for them retain their previous values rather than receiving default values.

I was actually using that capability: In my application I configure the grid rows from top to bottom. In each row, the cells immediately get their col assigned. Only after the last row is defined, I assign the row attribute from top to bottom. The Prima grid rows are numbered from bottom to top, so I need to know the number of rows before assigning the row value for the topmost row.

If there is a technical reason for the extra check, please reject the PR. The sentence in the documentation should be removed, and I'll reorder my code so that I can set row and column in one go.

@dk
Copy link
Owner

dk commented Feb 18, 2025

That check is needed actually if the slave to be checked in in a packer or a placer. I just committed exactly that

@dk dk closed this Feb 18, 2025
@HaraldJoerg HaraldJoerg deleted the reconfigure_grid branch February 18, 2025 22:07
@HaraldJoerg
Copy link
Contributor Author

Your fix c254fe0 does the trick, thank you!

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.

2 participants