1
0
Fork 0

Hide Keep Size QCheckBox from all but Binary Edit

This commit is contained in:
dad 2023-09-22 12:50:38 -06:00
parent c65c956f85
commit 13bd1f3164
5 changed files with 4 additions and 4 deletions

View File

@ -1358,6 +1358,7 @@ void CPUDisassembly::enableHighlightingModeSlot()
void CPUDisassembly::binaryEditSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(true);
dsint selStart = getSelectionStart();
dsint selSize = getSelectionEnd() - selStart + 1;
byte_t* data = new byte_t[selSize];
@ -1379,7 +1380,6 @@ void CPUDisassembly::binaryEditSlot()
void CPUDisassembly::binaryFillSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(false);
hexEdit.mHexEdit->setOverwriteMode(false);
dsint selStart = getSelectionStart();
hexEdit.setWindowTitle(tr("Fill code at %1").arg(ToPtrString(rvaToVa(selStart))));

View File

@ -1336,6 +1336,7 @@ void CPUDump::findReferencesSlot()
void CPUDump::binaryEditSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(true);
dsint selStart = getSelectionStart();
dsint selSize = getSelectionEnd() - selStart + 1;
byte_t* data = new byte_t[selSize];
@ -1357,7 +1358,6 @@ void CPUDump::binaryEditSlot()
void CPUDump::binaryFillSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(false);
hexEdit.mHexEdit->setOverwriteMode(false);
dsint selStart = getSelectionStart();
hexEdit.setWindowTitle(tr("Fill data at %1").arg(ToPtrString(rvaToVa(selStart))));

View File

@ -778,6 +778,7 @@ void CPUStack::followStackSlot()
void CPUStack::binaryEditSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(true);
dsint selStart = getSelectionStart();
dsint selSize = getSelectionEnd() - selStart + 1;
byte_t* data = new byte_t[selSize];
@ -799,7 +800,6 @@ void CPUStack::binaryEditSlot()
void CPUStack::binaryFillSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(false);
hexEdit.mHexEdit->setOverwriteMode(false);
dsint selStart = getSelectionStart();
hexEdit.setWindowTitle(tr("Fill data at %1").arg(ToPtrString(rvaToVa(selStart))));

View File

@ -26,6 +26,7 @@ HexEditDialog::HexEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::HexE
ui->lineEditAscii->setEncoding(QTextCodec::codecForName("System"));
ui->lineEditUnicode->setEncoding(QTextCodec::codecForName("UTF-16"));
ui->chkKeepSize->setChecked(ConfigBool("HexDump", "KeepSize"));
ui->chkKeepSize->hide();
ui->chkEntireBlock->hide();
mDataInitialized = false;

View File

@ -606,7 +606,6 @@ void MemoryMapView::findPatternSlot()
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..."));