From 4d2109c6341925383a0a23868e451e51214bf216 Mon Sep 17 00:00:00 2001 From: mrexodia Date: Thu, 13 Oct 2016 14:37:02 +0200 Subject: [PATCH] GUI: use setChecked instead of a bold font with the freeze stack action --- src/gui/Src/Gui/CPUStack.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/gui/Src/Gui/CPUStack.cpp b/src/gui/Src/Gui/CPUStack.cpp index 317d0572..29f19869 100644 --- a/src/gui/Src/Gui/CPUStack.cpp +++ b/src/gui/Src/Gui/CPUStack.cpp @@ -233,6 +233,7 @@ void CPUStack::setupContextMenu() connect(mGotoBp, SIGNAL(triggered()), this, SLOT(gotoBpSlot())); mFreezeStack = new QAction(DIcon("freeze.png"), tr("Freeze the stack"), this); + mFreezeStack->setCheckable(true); this->addAction(mFreezeStack); connect(mFreezeStack, SIGNAL(triggered()), this, SLOT(freezeStackSlot())); @@ -326,20 +327,11 @@ void CPUStack::setupContextMenu() void CPUStack::updateFreezeStackAction() { - QFont font = mFreezeStack->font(); - if(bStackFrozen) - { - font.setBold(true); - mFreezeStack->setFont(font); mFreezeStack->setText(tr("Unfreeze the stack")); - } else - { - font.setBold(false); - mFreezeStack->setFont(font); mFreezeStack->setText(tr("Freeze the stack")); - } + mFreezeStack->setChecked(bStackFrozen); } void CPUStack::refreshShortcutsSlot()