From 393495c0d0bf97830506fc6412aebd189e393280 Mon Sep 17 00:00:00 2001 From: Peter Lohrmann Date: Thu, 12 Feb 2015 15:45:45 -0800 Subject: [PATCH] glvdebug: Fix highlighting API call in call tree when replayer is paused and a proxyModel is being used. * There was inconsistency in which model was being used to get the QModelIndex, which caused nothing to be highlighted in the API call tree. --- tools/glave/src/glvdebug/glvdebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/glave/src/glvdebug/glvdebug.cpp b/tools/glave/src/glvdebug/glvdebug.cpp index 2244e68..6a3389c 100755 --- a/tools/glave/src/glvdebug/glvdebug.cpp +++ b/tools/glave/src/glvdebug/glvdebug.cpp @@ -256,11 +256,11 @@ void glvdebug::select_call_at_packet_index(unsigned long long packetIndex) QModelIndex start = m_pTraceFileModel->index(0, glvdebug_QTraceFileModel::Column_PacketIndex); - QModelIndexList matches = ui->treeView->model()->match(start, Qt::DisplayRole, QVariant(packetIndex), 1, Qt::MatchFixedString | Qt::MatchRecursive | Qt::MatchWrap); + QModelIndexList matches = m_pTraceFileModel->match(start, Qt::DisplayRole, QVariant(packetIndex), 1, Qt::MatchFixedString | Qt::MatchRecursive | Qt::MatchWrap); if (matches.count() > 0) { // for some reason, we need to recreate the index such that the index and parent both are for column 0 - QModelIndex updatedMatch = ui->treeView->model()->index(matches[0].row(), 0, ui->treeView->model()->index(matches[0].parent().row(), 0)); + QModelIndex updatedMatch = m_pTraceFileModel->index(matches[0].row(), 0, m_pTraceFileModel->index(matches[0].parent().row(), 0)); selectApicallModelIndex(updatedMatch, true, true); ui->treeView->setFocus(); -- 2.7.4