mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
Pre-select arch and bytes on hexdump preview
This commit is contained in:
parent
00354483a1
commit
48897c15ba
@ -202,6 +202,7 @@ void OptionsDialog::anal_finished()
|
||||
this->w->updateFrames();
|
||||
this->w->setFilename(this->filename);
|
||||
this->w->get_refs( this->w->core->cmd("?v entry0") );
|
||||
this->w->memoryDock->selectHexPreview();
|
||||
|
||||
// Restore project notes
|
||||
QString notes = this->core->cmd("Pn");
|
||||
|
@ -1671,3 +1671,19 @@ void MemoryWidget::on_opcodeDescButton_clicked()
|
||||
ui->opcodeDescButton->setArrowType(Qt::DownArrow);
|
||||
}
|
||||
}
|
||||
|
||||
void MemoryWidget::selectHexPreview() {
|
||||
// Pre-select arch and bits in the hexdump sidebar
|
||||
QString arch = this->main->core->cmd("e asm.arch").trimmed();
|
||||
QString bits = this->main->core->cmd("e asm.bits").trimmed();
|
||||
|
||||
//int arch_index = ui->hexArchComboBox_2->findText(arch);
|
||||
if (ui->hexArchComboBox_2->findText(arch) != -1) {
|
||||
ui->hexArchComboBox_2->setCurrentIndex(ui->hexArchComboBox_2->findText(arch));
|
||||
}
|
||||
|
||||
//int bits_index = ui->hexBitsComboBox_2->findText(bits);
|
||||
if (ui->hexBitsComboBox_2->findText(bits) != -1) {
|
||||
ui->hexBitsComboBox_2->setCurrentIndex(ui->hexBitsComboBox_2->findText(bits));
|
||||
}
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ public slots:
|
||||
|
||||
void highlightDisasms();
|
||||
|
||||
void selectHexPreview();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user