1
0
Fork 0

GUI: Hide 'Keep size' checkbox while binary filling (#721)

Fixes #706.
This commit is contained in:
Atvaark 2016-06-05 21:27:15 +02:00 committed by Duncan Ogilvie
parent 98abebaf9b
commit c5cfa605e9
5 changed files with 13 additions and 0 deletions

View File

@ -1074,6 +1074,7 @@ void CPUDisassembly::binaryEditSlot()
void CPUDisassembly::binaryFillSlot()
{
HexEditDialog hexEdit(this);
hexEdit.showKeepSize(false);
hexEdit.mHexEdit->setOverwriteMode(false);
dsint selStart = getSelectionStart();
hexEdit.setWindowTitle("Fill code at " + QString("%1").arg(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper());

View File

@ -1434,6 +1434,7 @@ 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(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper());

View File

@ -696,6 +696,7 @@ 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(rvaToVa(selStart), sizeof(dsint) * 2, 16, QChar('0')).toUpper());

View File

@ -48,6 +48,14 @@ void HexEditDialog::showEntireBlock(bool show)
ui->chkEntireBlock->hide();
}
void HexEditDialog::showKeepSize(bool show)
{
if(show)
ui->chkKeepSize->show();
else
ui->chkKeepSize->hide();
}
bool HexEditDialog::entireBlock()
{
return ui->chkEntireBlock->isChecked();

View File

@ -18,6 +18,8 @@ public:
~HexEditDialog();
void showEntireBlock(bool show);
void showKeepSize(bool show);
bool entireBlock();
QHexEdit* mHexEdit;