1
0
Fork 0

GUI: use setChecked instead of a bold font with the freeze stack action

This commit is contained in:
mrexodia 2016-10-13 14:37:02 +02:00
parent 18402a4c6b
commit 4d2109c634
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 2 additions and 10 deletions

View File

@ -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()