From db4f556f42b0907ada6a4b535335342aac12a28f Mon Sep 17 00:00:00 2001 From: Rohan-Sagar Date: Mon, 18 Mar 2024 22:17:13 -0400 Subject: [PATCH] Update HexWidget.cpp --- src/widgets/HexWidget.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/widgets/HexWidget.cpp b/src/widgets/HexWidget.cpp index 6adc2432..8775479b 100644 --- a/src/widgets/HexWidget.cpp +++ b/src/widgets/HexWidget.cpp @@ -226,11 +226,6 @@ HexWidget::HexWidget(QWidget *parent) connect(&warningTimer, &QTimer::timeout, this, &HexWidget::hideWarningRect); } -QWidget *HexWidget::parentForDialog() -{ - return parentWidget(); -} - void HexWidget::setMonospaceFont(const QFont &font) { if (!(font.styleHint() & QFont::Monospace)) { @@ -1177,10 +1172,10 @@ void HexWidget::contextMenuEvent(QContextMenuEvent *event) actionComment->setText(tr("Edit Comment")); } - QString flag = Core()->flagAt(cursor.address); - RzFlagItem *flagItem = rz_flag_get_i(Core()->core()->flags, cursor.address); + auto coreLock = Core()->core(); + RZFlagItem *flagItem = rz_flag_get_i(coreLock->flags, cursor.address); - if (flagItem == 0x0 || flag.isNull() || flag.isEmpty()) { + if (flagItem == 0x0) { actionDeleteFlag->setVisible(false); actionFlag->setText(tr("Add Flag")); } else {