mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 11:56:12 +00:00
Automatically select the first line of xref (#1849)
This commit is contained in:
parent
d450044a2d
commit
723c1ea33d
@ -151,9 +151,11 @@ void XrefsDialog::fillRefsForAddress(RVA addr, QString name, bool whole_function
|
|||||||
qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0);
|
qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0);
|
||||||
qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0);
|
qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0);
|
||||||
|
|
||||||
// try to select first item from refs or xrefs
|
// Automatically select the first line
|
||||||
if (!qhelpers::selectFirstItem(ui->toTreeWidget)) {
|
if (toModel.hasIndex(0, 0)) {
|
||||||
qhelpers::selectFirstItem(ui->fromTreeWidget);
|
ui->toTreeWidget->setCurrentIndex(toModel.index(0, 0));
|
||||||
|
} else if (fromModel.hasIndex(0, 0)) {
|
||||||
|
ui->fromTreeWidget->setCurrentIndex(fromModel.index(0, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user