Sync hex.pairs eval to "Bytes as pairs" in Hexdump (#1586)

* Sync hex.pairs eval
This commit is contained in:
Itay Cohen 2019-05-29 09:25:23 +03:00 committed by GitHub
parent adf28e4362
commit 53756f29d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,6 +209,7 @@ void HexWidget::updateCounts()
{ {
actionHexPairs->setEnabled(rowSizeBytes > 1 && itemByteLen == 1 actionHexPairs->setEnabled(rowSizeBytes > 1 && itemByteLen == 1
&& itemFormat == ItemFormat::ItemFormatHex); && itemFormat == ItemFormat::ItemFormatHex);
actionHexPairs->setChecked(Core()->getConfigb("hex.pairs"));
if (actionHexPairs->isChecked() && actionHexPairs->isEnabled()) { if (actionHexPairs->isChecked() && actionHexPairs->isEnabled()) {
itemGroupSize = 2; itemGroupSize = 2;
} else { } else {
@ -550,6 +551,8 @@ void HexWidget::onCursorBlinked()
void HexWidget::onHexPairsModeEnabled(bool enable) void HexWidget::onHexPairsModeEnabled(bool enable)
{ {
// Sync configuration
Core()->setConfig("hex.pairs", enable);
if (enable) { if (enable) {
setItemGroupSize(2); setItemGroupSize(2);
} else { } else {