FIX: fix the crash issue when dragging object in seq-print

Change-Id: If2fd7e2d4d41e6cde6c8d4824cf489e10700c91e
This commit is contained in:
lane.wei 2022-12-07 21:55:04 +08:00 committed by Lane.Wei
parent 941df8ba8b
commit 81e723711a
2 changed files with 20 additions and 1 deletions

View file

@ -173,6 +173,18 @@ public:
{
return m_children.Item(n);
}
int GetChildIndex(ObjectDataViewModelNode* child) const
{
size_t child_count = GetChildCount();
for (int index = 0; index < child_count; index++)
{
if (m_children.Item(index) == child)
return index;
}
return -1;
}
void Insert(ObjectDataViewModelNode* child, unsigned int n)
{
if (!m_container)