From 5b21f970ac742d46f3c86f2bb90d73bf6a6e66dd Mon Sep 17 00:00:00 2001 From: xarkes Date: Sun, 3 Dec 2017 02:44:12 +0100 Subject: [PATCH] Clean up Hexdump Sidebar (Fix #121) --- src/widgets/HexdumpWidget.cpp | 4 ++-- src/widgets/HexdumpWidget.h | 4 +--- src/widgets/HexdumpWidget.ui | 33 ++++----------------------------- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp index 3dfdb517..bc9b0b91 100644 --- a/src/widgets/HexdumpWidget.cpp +++ b/src/widgets/HexdumpWidget.cpp @@ -79,6 +79,7 @@ HexdumpWidget::HexdumpWidget(QWidget *parent, Qt::WindowFlags flags) : }); fillPlugins(); + selectHexPreview(); } HexdumpWidget::HexdumpWidget(const QString &title, QWidget *parent, Qt::WindowFlags flags) @@ -812,13 +813,12 @@ void HexdumpWidget::on_codeCombo_2_currentTextChanged(const QString &arg1) if (arg1 == "Dissasembly") { ui->hexSideFrame_2->show(); - ui->hexDisasTextEdit->setPlainText(";; Select some bytes on the left\n;; to see them disassembled"); } else { ui->hexSideFrame_2->hide(); - ui->hexDisasTextEdit->setPlainText(";; Select some bytes on the left\n;; to see them parsed here"); } + on_hexHexText_selectionChanged(); } QString HexdumpWidget::normalize_addr(QString addr) diff --git a/src/widgets/HexdumpWidget.h b/src/widgets/HexdumpWidget.h index 1816c448..3985980e 100644 --- a/src/widgets/HexdumpWidget.h +++ b/src/widgets/HexdumpWidget.h @@ -45,8 +45,6 @@ public slots: QString normalizeAddr(QString addr); - void selectHexPreview(); - void showOffsets(bool show); void zoomIn(int range = 1); @@ -69,7 +67,7 @@ private: void refresh(RVA addr = RVA_INVALID); void appendHexdumpLines(int lines, bool top); void removeHexdumpLines(int lines, bool top); - + void selectHexPreview(); void updateHeaders(); std::array fetchHexdump(RVA offset, RVA bytes); diff --git a/src/widgets/HexdumpWidget.ui b/src/widgets/HexdumpWidget.ui index c7be65e6..9a146dd7 100644 --- a/src/widgets/HexdumpWidget.ui +++ b/src/widgets/HexdumpWidget.ui @@ -368,6 +368,9 @@ QToolTip { 0 + + Dissasembly + Dissasembly @@ -574,8 +577,7 @@ QToolTip { 0 - ;; Select some bytes on the left -;; to see them disassembled + @@ -832,40 +834,13 @@ QToolTip { - - - - Qt::Horizontal - - - 0 - - - - <b>Histogram</b> - - - - - - - Qt::Vertical - - - - 20 - 40 - - - -