Set auto-resume QAction using a cleaner method.

This commit is contained in:
mjbudd77 2021-05-18 21:29:22 -04:00
parent 009733be8a
commit 4ff17bcb8e
1 changed files with 2 additions and 3 deletions

View File

@ -676,7 +676,7 @@ void consoleWin_t::createMainMenu(void)
QAction *act; QAction *act;
QMenu *subMenu, *aviMenu; QMenu *subMenu, *aviMenu;
QActionGroup *group; QActionGroup *group;
int useNativeMenuBar, opt; int useNativeMenuBar;
//QShortcut *shortcut; //QShortcut *shortcut;
menubar = new consoleMenuBar(this); menubar = new consoleMenuBar(this);
@ -969,8 +969,7 @@ void consoleWin_t::createMainMenu(void)
//autoResume->setShortcut( QKeySequence(tr("Ctrl+C"))); //autoResume->setShortcut( QKeySequence(tr("Ctrl+C")));
autoResume->setCheckable(true); autoResume->setCheckable(true);
autoResume->setStatusTip(tr("Auto-Resume Play")); autoResume->setStatusTip(tr("Auto-Resume Play"));
g_config->getOption ("SDL.AutoResume", &opt ); syncActionConfig( autoResume, "SDL.AutoResume" );
autoResume->setChecked( opt ? true : false );
connect(autoResume, SIGNAL(triggered()), this, SLOT(toggleAutoResume(void)) ); connect(autoResume, SIGNAL(triggered()), this, SLOT(toggleAutoResume(void)) );
optMenu->addAction(autoResume); optMenu->addAction(autoResume);