Skip to content

[PropertyOverrideButton] fire modfiication signals on setToProperty#65921

Open
troopa81 wants to merge 1 commit intoqgis:masterfrom
troopa81:fix_propertybtn_settoproperty
Open

[PropertyOverrideButton] fire modfiication signals on setToProperty#65921
troopa81 wants to merge 1 commit intoqgis:masterfrom
troopa81:fix_propertybtn_settoproperty

Conversation

@troopa81
Copy link
Copy Markdown
Contributor

Fixed during #64877

No AI usage

@troopa81 troopa81 added Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports backport release-4_0 labels Apr 24, 2026
@github-actions github-actions Bot added this to the 4.2.0 milestone Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit 46cb946)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 46cb946)

@nyalldawson
Copy link
Copy Markdown
Collaborator

@troopa81 this potentially introduces update loops (eg a widget listening to changed signals on the button, then an "update state" method in that widget setting the button GUI to match, which the triggers and unwanted "changed" signal from the widget (when nothing actually was changed by the user)

It's usually cleaner to make the caller responsible for handling this, and not relying on API setting of button state to trigger a different slot. Just call that manually from the code setting the button state instead.

Otherwise you'd need to do a full check over everywhere these signals are connected and setToProperty is called, to verify that there's no chance of regression. (And that's a LOT of places)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport queued_ltr_backports Queued Backports backport release-4_0 Bug Either a bug report, or a bug fix. Let's hope for the latter!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants