Fix wxPGProperty::GetMainParent() function
Traversing upwards in the tree should be stopped when parent is root or category property.
This commit is contained in:
parent
a33b364d84
commit
7a7777cb4a
@ -2254,7 +2254,7 @@ wxPGProperty* wxPGProperty::GetMainParent() const
|
||||
const wxPGProperty* curChild = this;
|
||||
const wxPGProperty* curParent = m_parent;
|
||||
|
||||
while ( curParent && !curParent->IsCategory() )
|
||||
while ( !curParent->IsRoot() && !curParent->IsCategory() )
|
||||
{
|
||||
curChild = curParent;
|
||||
curParent = curParent->m_parent;
|
||||
|
Loading…
Reference in New Issue
Block a user