: m_parentItem(NULL),
m_pApiCallItem(NULL),
m_pFrameItem(NULL),
- m_pModel(pModel)
+ m_pModel(pModel),
+ m_localRowIndex(0)
{
m_columnData[VOGL_ACTC_APICALL] = "API Call";
m_columnData[VOGL_ACTC_INDEX] = "Index";
: m_parentItem(parent),
m_pApiCallItem(NULL),
m_pFrameItem(frameItem),
- m_pModel(NULL)
+ m_pModel(NULL),
+ m_localRowIndex(0)
{
if (frameItem != NULL)
{
: m_parentItem(parent),
m_pApiCallItem(apiCallItem),
m_pFrameItem(NULL),
- m_pModel(NULL)
+ m_pModel(NULL),
+ m_localRowIndex(0)
{
m_columnData[VOGL_ACTC_APICALL] = nodeText;
void vogleditor_apiCallTreeItem::appendChild(vogleditor_apiCallTreeItem* pChild)
{
- m_childItems.append(pChild);
+ pChild->m_localRowIndex = m_childItems.size();
+ m_childItems.append(pChild);
}
int vogleditor_apiCallTreeItem::childCount() const
int vogleditor_apiCallTreeItem::row() const
{
// note, this is just the row within the current level of the hierarchy
- if (m_parentItem)
- return m_parentItem->m_childItems.indexOf(const_cast<vogleditor_apiCallTreeItem*>(this));
-
- return 0;
+ return m_localRowIndex;
}
vogleditor_apiCallItem* m_pApiCallItem;
vogleditor_frameItem* m_pFrameItem;
vogleditor_QApiCallTreeModel* m_pModel;
+ int m_localRowIndex;
};
#endif // VOGLEDITOR_APICALLTREEITEM_H