mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Use single QVariant tagging on RDTreeWidgetItem instead of setData
* It saves on allocating a vector of vectors and in most cases is all we need.
This commit is contained in:
@@ -94,7 +94,7 @@ void APIInspector::on_apiEvents_itemSelectionChanged()
|
||||
if(!node)
|
||||
return;
|
||||
|
||||
APIEvent ev = ui->apiEvents->selectedItems()[0]->data(0, Qt::UserRole).value<APIEvent>();
|
||||
APIEvent ev = node->tag().value<APIEvent>();
|
||||
|
||||
if(ev.callstack.count > 0)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ void APIInspector::fillAPIView()
|
||||
if(ev.eventID == draw->eventID)
|
||||
root->setBold(true);
|
||||
|
||||
root->setData(0, Qt::UserRole, QVariant::fromValue(ev));
|
||||
root->setTag(QVariant::fromValue(ev));
|
||||
|
||||
ui->apiEvents->addTopLevelItem(root);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user