Browse Source

Simplify Code

Since it's just a state-toogler, use the return value of the
method to set the values directly.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
QGC4.4
Tomaz Canabrava 10 years ago
parent
commit
2448b80b5f
  1. 12
      src/ui/MainWindow.cc

12
src/ui/MainWindow.cc

@ -238,16 +238,8 @@ MainWindow::MainWindow() @@ -238,16 +238,8 @@ MainWindow::MainWindow()
}
// Make sure the proper fullscreen/normal menu item is checked properly.
if (isFullScreen())
{
_ui.actionFullscreen->setChecked(true);
_ui.actionNormal->setChecked(false);
}
else
{
_ui.actionFullscreen->setChecked(false);
_ui.actionNormal->setChecked(true);
}
_ui.actionFullscreen->setChecked(isFullScreen());
_ui.actionNormal->setChecked(!isFullScreen());
// And that they will stay checked properly after user input
connect(_ui.actionFullscreen, &QAction::triggered, this, &MainWindow::fullScreenActionItemCallback);

Loading…
Cancel
Save