Skip to content

Constraint removal by display name can remove the wrong parameter's constraint #328

Description

@rozyczko

Source: EasyReflectometryApp/Backends/Py/sample.py:916-944 — DEEP_ANALYSIS.md §5 item 17 (and §3.3)

removeConstraintByIndex resolves the parameter to un-constrain by display name via _find_parameter_object_by_name, including a regex strip of M\d+ prefixes (line 969). Two parameters with the same display name (two models with same layer names — entirely plausible) resolve to the first match, so the wrong constraint can be removed.

Fix: Carry unique_name through to QML and key constraint removal by unique_name instead of display name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] highShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions