GUI: save entire block preference
This commit is contained in:
parent
2bd139d89f
commit
3e8b9682bf
|
|
@ -97,9 +97,10 @@ HexEditDialog::~HexEditDialog()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void HexEditDialog::showEntireBlock(bool show)
|
||||
void HexEditDialog::showEntireBlock(bool show, bool checked)
|
||||
{
|
||||
ui->chkEntireBlock->setVisible(show);
|
||||
ui->chkEntireBlock->setChecked(checked);
|
||||
}
|
||||
|
||||
void HexEditDialog::showKeepSize(bool show)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public:
|
|||
explicit HexEditDialog(QWidget* parent = 0);
|
||||
~HexEditDialog();
|
||||
|
||||
void showEntireBlock(bool show);
|
||||
void showEntireBlock(bool show, bool checked = false);
|
||||
void showKeepSize(bool show);
|
||||
void isDataCopiable(bool copyDataEnabled);
|
||||
void updateCodepage();
|
||||
|
|
|
|||
|
|
@ -543,14 +543,19 @@ void MemoryMapView::memoryAllocateSlot()
|
|||
void MemoryMapView::findPatternSlot()
|
||||
{
|
||||
HexEditDialog hexEdit(this);
|
||||
hexEdit.showEntireBlock(true);
|
||||
duint entireBlockEnabled = 0;
|
||||
BridgeSettingGetUint("Gui", "MemoryMapEntireBlock", &entireBlockEnabled);
|
||||
hexEdit.showEntireBlock(true, entireBlockEnabled);
|
||||
hexEdit.showKeepSize(false);
|
||||
hexEdit.isDataCopiable(false);
|
||||
hexEdit.mHexEdit->setOverwriteMode(false);
|
||||
hexEdit.setWindowTitle(tr("Find Pattern..."));
|
||||
if(hexEdit.exec() != QDialog::Accepted)
|
||||
return;
|
||||
duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16);
|
||||
if(hexEdit.entireBlock())
|
||||
entireBlockEnabled = hexEdit.entireBlock();
|
||||
BridgeSettingSetUint("Gui", "MemoryMapEntireBlock", entireBlockEnabled);
|
||||
if(entireBlockEnabled)
|
||||
addr = 0;
|
||||
QString addrText = ToPtrString(addr);
|
||||
DbgCmdExec(QString("findmemall " + addrText + ", \"" + hexEdit.mHexEdit->pattern() + "\", &data&").toUtf8().constData());
|
||||
|
|
|
|||
Loading…
Reference in New Issue