diff options
| author | 2018-08-06 14:28:01 -0400 | |
|---|---|---|
| committer | 2018-08-06 14:32:28 -0400 | |
| commit | cf983888cc781b6ce5550998d6b1c482000a990b (patch) | |
| tree | cd4b03e1bdca4127787bca03702e3e9c7e373629 /src | |
| parent | Merge pull request #933 from lioncash/memory (diff) | |
| download | yuzu-cf983888cc781b6ce5550998d6b1c482000a990b.tar.gz yuzu-cf983888cc781b6ce5550998d6b1c482000a990b.tar.xz yuzu-cf983888cc781b6ce5550998d6b1c482000a990b.zip | |
qt/main: Collapse if statement in UpdateRecentFiles()
Given the function accepts a boolean, we don't need to use an if
statement here and repeat ourselves.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e28679cd1..66e4ed5ba 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -595,12 +595,8 @@ void GMainWindow::UpdateRecentFiles() { | |||
| 595 | actions_recent_files[j]->setVisible(false); | 595 | actions_recent_files[j]->setVisible(false); |
| 596 | } | 596 | } |
| 597 | 597 | ||
| 598 | // Grey out the recent files menu if the list is empty | 598 | // Enable the recent files menu if the list isn't empty |
| 599 | if (num_recent_files == 0) { | 599 | ui.menu_recent_files->setEnabled(num_recent_files != 0); |
| 600 | ui.menu_recent_files->setEnabled(false); | ||
| 601 | } else { | ||
| 602 | ui.menu_recent_files->setEnabled(true); | ||
| 603 | } | ||
| 604 | } | 600 | } |
| 605 | 601 | ||
| 606 | void GMainWindow::OnGameListLoadFile(QString game_path) { | 602 | void GMainWindow::OnGameListLoadFile(QString game_path) { |