Update child widget on button action changes - #1286
Merged
Merged
Conversation
ThomasKroes
approved these changes
Jul 28, 2026
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.
In the current core, a
WidgetActionToolButtonthat is re-pointed at a different action keeps showing the action it was first opened with. Changing the action is ignored, for the lifetime of the button.This appeared when using
PluginTriggerPickerActionin the FcsLoader to provide transformation plugins in the loader (e.g., do a log transform after loading in a single (user facing) step).PluginTriggerPickerActionfor transformations uses aWidgetActionToolButtonto provide access to transformation plugins' settings. If multiple transformation plugins with different settings are present, only the first shown settings widget would be shown.This is fixed by connecting the already existing
actionChangedsignal to delete the child widget. (ll. 79-85)The fix surfaced a second issue; the size of the widget would only be set once on start, so deleting the child and adding a bigger one would squish the ui (I already noticed similar behavior when modifying visible UI in these widgets, instead of disabling, I did not pursue this, but this might also fix, or be useful for that case).
This behavior is fixed by return
sizeHintfrom popups if available and notifying menu on init. (rest of changes)Example of correct widgets for two different transformations (centering and derivative) exposed through the
PluginTriggerPickerAction.When first opening the panel for the centering transform then switching to derivative and opening the panel (note the panel must be opened in both steps, due to its lazy loading behavior). The panel does not update and derivate transform shows the centering panel.