View Issue Details

IDProjectCategoryView StatusLast Update
0001464NoesisGUIC# SDKpublic2019-05-10 20:35
Reporterai_enabledAssigned Tosfernandez 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.2.2 
Target Version2.2.3Fixed in Version2.2.3 
Summary0001464: GoToStateAction FindStateGroup wrong implementation?
DescriptionHi guys,

https://github.com/Noesis/Managed/blob/4af4b9eae10395b19f8603e880c6425be0b99780/Src/NoesisApp/Core/Src/Interactivity/GoToStateAction.cs#L84

Looks like you're always returning null. What's the point of this method, then?

Regards!
TagsNo tags attached.
PlatformAny

Activities

sfernandez

sfernandez

2019-05-10 20:35

manager   ~0005672

You're right, this is a bug, part of the code in that function is missing, it should be like this:
private FrameworkElement FindStateGroup(FrameworkElement context)
{
    if (context != null)
    {
        FrameworkElement current = context;
        FrameworkElement parent = context.Parent;

        while (!HasStateGroup(current) && ShouldWalkTree(parent))
        {
            current = parent;
            parent = parent.Parent;
        }

        if (HasStateGroup(current))
        {
            FrameworkElement templatedParent = current.TemplatedParent;
            if (templatedParent != null && templatedParent is Control)
            {
                return templatedParent;
            }
            if (parent != null && parent is UserControl)
            {
                return parent;
            }

            return current;
        }
    }

    return null;
}

Will appear fixed in next release.

Issue History

Date Modified Username Field Change
2019-05-10 20:16 ai_enabled New Issue
2019-05-10 20:28 sfernandez Assigned To => sfernandez
2019-05-10 20:28 sfernandez Status new => assigned
2019-05-10 20:28 sfernandez Target Version => 2.2.3
2019-05-10 20:35 sfernandez Status assigned => resolved
2019-05-10 20:35 sfernandez Resolution open => fixed
2019-05-10 20:35 sfernandez Fixed in Version => 2.2.3
2019-05-10 20:35 sfernandez Note Added: 0005672