diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index bc6d5e23..7f0140ce 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -179,6 +179,7 @@ void MainWindowViewer::setupUI() createActions(); setUpShortcutsManagement(); disableActions(); + disablePreviousNextComicActions(); createToolBars(); @@ -957,9 +958,12 @@ void MainWindowViewer::enableActions() void MainWindowViewer::disableActions() { setActionsEnabled(false); - for (auto *a : { setBookmarkAction, - openComicOnTheLeftAction, - openComicOnTheRightAction }) + setBookmarkAction->setEnabled(false); +} + +void MainWindowViewer::disablePreviousNextComicActions() +{ + for (auto *a : { openComicOnTheLeftAction, openComicOnTheRightAction }) a->setEnabled(false); } @@ -1125,17 +1129,9 @@ void MainWindowViewer::checkNewVersion() void MainWindowViewer::processReset() { - if (isClient) { - if (siblingComics.count() > 1) { - bool openNextB = openComicOnTheRightAction->isEnabled(); - bool openPrevB = openComicOnTheLeftAction->isEnabled(); - disableActions(); - openComicOnTheRightAction->setEnabled(openNextB); - openComicOnTheLeftAction->setEnabled(openPrevB); - } else - disableActions(); - } else - disableActions(); + disableActions(); + if (!isClient || siblingComics.size() <= 1) + disablePreviousNextComicActions(); } void MainWindowViewer::setUpShortcutsManagement() diff --git a/YACReader/main_window_viewer.h b/YACReader/main_window_viewer.h index 4bfc76c7..23c26683 100644 --- a/YACReader/main_window_viewer.h +++ b/YACReader/main_window_viewer.h @@ -45,6 +45,7 @@ public slots: void showToolBars(); void enableActions(); void disableActions(); + void disablePreviousNextComicActions(); void toggleFullScreen(); void toFullScreen(); void toNormal();