Skip to content

[6.40] [gui] fix context menu for member with multiple toggles choise - #23841

Merged
linev merged 3 commits into
root-project:v6-40-00-patchesfrom
linev:fix_toggle
Oct 26, 2026
Merged

linev merged 3 commits into
root-project:v6-40-00-patchesfrom
linev:fix_toggle

Conversation

@linev

@linev linev commented Oct 26, 2026

Copy link
Copy Markdown
Member

Backport of #23782

linev added 3 commits October 26, 2026 06:59
If data member is enum, setter method may accept enum data type
and therefore TMethodCall(class,method_name,"1") is not working.
One have to cast integer value to the type of setter method argument.
Do it only for enum, for other types more complex condition may apply
When `TDataMember::GetterMethod()` or `TDataMember::SetterMethod()`
are used to request `TMethodCall` instance - such instance is transient object
and pointer cannot be preserved for a long time.

Therefore in `TTogle` extract getter and setter callers right before usage.

Solves crash in `TASImage`` context menu where `fImageQuality` member
uses multiple toggles for selection of attribute.

Also cleanup `TToggle` code to avoid plain string usage and simplify
several methods.
Directly specify TDataMember pointer in SetToggledObject call. It has special handling in toggle object, therefore
better use clear syntax here
@linev linev self-assigned this Oct 26, 2026
@github-actions

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 13h 22m 2s ⏱️
 3 874 tests  3 821 ✅ 0 💤 53 ❌
77 372 runs  77 315 ✅ 1 💤 56 ❌

For more details on these failures, see this check.

Results for commit 474a1e3.

@linev
linev merged commit dc84da0 into root-project:v6-40-00-patches Oct 26, 2026
26 of 34 checks passed
@linev
linev deleted the fix_toggle branch October 26, 2026 08:28
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.

1 participant