mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Disabling edit triggers on results view, add double click to jump to EID
This commit is contained in:
@@ -142,6 +142,8 @@ void PerformanceCounterViewer::CaptureCounters()
|
||||
ui->counterResults->setItem(row, counterIndex[results[i].counterID] + 1,
|
||||
new QTableWidgetItem(FormatCounterResult(
|
||||
results[i], counterDescriptions[results[i].counterID])));
|
||||
|
||||
ui->counterResults->item(row, 0)->setData(Qt::UserRole, results[i].eventID);
|
||||
}
|
||||
|
||||
ui->counterResults->resizeColumnsToContents();
|
||||
@@ -169,4 +171,18 @@ void PerformanceCounterViewer::OnLogfileClosed()
|
||||
void PerformanceCounterViewer::OnLogfileLoaded()
|
||||
{
|
||||
ui->captureCounters->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void PerformanceCounterViewer::on_counterResults_doubleClicked(const QModelIndex &index)
|
||||
{
|
||||
QTableWidgetItem *item = ui->counterResults->item(index.row(), 0);
|
||||
|
||||
if(item)
|
||||
{
|
||||
bool ok = false;
|
||||
uint32_t eid = item->data(Qt::UserRole).toUInt(&ok);
|
||||
|
||||
if(ok)
|
||||
m_Ctx.SetEventID({}, eid, eid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,10 @@ public:
|
||||
void OnLogfileClosed() override;
|
||||
void OnSelectedEventChanged(uint32_t eventID) override {}
|
||||
void OnEventChanged(uint32_t eventID) override {}
|
||||
private slots:
|
||||
// automatic slots
|
||||
void on_counterResults_doubleClicked(const QModelIndex &index);
|
||||
|
||||
private:
|
||||
Ui::PerformanceCounterViewer *ui;
|
||||
ICaptureContext &m_Ctx;
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="counterResults">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
|
||||
Reference in New Issue
Block a user