Download

WidgetSwitcher (IsChildOf->ActiveWidget)

hey,
i am currently stuck on a problem regarding widgetswitchers:



if(CurrentWidget->IsChildOf(CurrentWidgetSwitcher->GetWidgetAtIndex(CurrentWidgetSwitcher->ActiveWidgetIndex)))
     ...


this behaves weird imo:
when the CurrentWidget has a parent, such as for example a horizontal box, and this parent is child of the CurrentWidgetSwitcher, the code returns true
when the CurrentWidget is a child of the CurrentWidgetSwitcher (for example at index 0), the code returns false

is this the expected behavior?

thanks for the help!

edit:



if(CurrentWidget->IsChildOf(CurrentWidgetSwitcher->GetWidgetAtIndex(CurrentWidgetSwitcher->ActiveWidgetIndex)) || CurrentWidget == CurrentWidgetSwitcher->GetWidgetAtIndex(CurrentWidgetSwitcher->ActiveWidgetIndex)
     ...


is correct of courseā€¦