Skip to content

Fix how the layer list updates its widgets#1976

Merged
cameronwhite merged 1 commit into
masterfrom
fix/layer-widget-updates
Feb 9, 2026
Merged

Fix how the layer list updates its widgets#1976
cameronwhite merged 1 commit into
masterfrom
fix/layer-widget-updates

Conversation

@cameronwhite

Copy link
Copy Markdown
Member

Previously the list items were entirely rebuilt in order to update the UI. This was the root cause of the crash in the referenced bug report, because updating the current layer after a right click could finalize tools and rebuild the widgets (causing the popover menu to be attached to a widget that was about to be removed)

  • Add an event to signal that the layer item has changed, allowing the widget to update itself. Using GObject properties and bindings is the "proper" way to update the widget, but currently we can't add properties for a managed subclass

  • Avoid unnecessary calls to SetCurrentUserLayer if our layer is already current. This avoids some extra updates from selection change events.

Bug: #1940

Previously the list items were entirely rebuilt in order to update the UI. This was the root cause of the crash in the referenced bug report, because updating the current layer after a right click could finalize tools and rebuild the widgets (causing the popover menu to be attached to a widget that was about to be removed)

- Add an event to signal that the layer item has changed, allowing the widget to update itself. Using GObject properties and bindings is the "proper" way to update the widget, but currently we can't add properties for a managed subclass

- Avoid unnecessary calls to SetCurrentUserLayer if our layer is already current. This avoids some extra updates from selection change events.

Bug: #1940
@cameronwhite cameronwhite linked an issue Feb 9, 2026 that may be closed by this pull request
@cameronwhite cameronwhite merged commit 438bd26 into master Feb 9, 2026
13 checks passed
@cameronwhite cameronwhite deleted the fix/layer-widget-updates branch February 9, 2026 04:05
@badcel

badcel commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

The GirCore bug to add properties to a subclass is gircore/gir.core#1433.

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.

Right clicking a layer closes program

2 participants