From d70e2136ce891bcf0d3047eb40fe18d45dc22d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Fri, 9 Jun 2023 19:02:51 +0200 Subject: [PATCH] Map comic type to manga mode in YACReader until comic type is fully supported --- YACReader/main_window_viewer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/YACReader/main_window_viewer.cpp b/YACReader/main_window_viewer.cpp index 56b6352e..2188cb30 100644 --- a/YACReader/main_window_viewer.cpp +++ b/YACReader/main_window_viewer.cpp @@ -798,8 +798,12 @@ void MainWindowViewer::open(QString path, ComicDB &comic, QList &siblin else setWindowTitle("YACReader - " + fi.fileName()); - viewer->setMangaWithoutStoringSetting(comic.info.manga.toBool()); - doubleMangaPageAction->setChecked(comic.info.manga.toBool()); + auto type = comic.info.type.value(); + // TODO: support comic.info.type by adjusting the scrolling and double page mode behaviour depending on the actual type, for now type is mapped to manga mode + auto isManga = type == YACReader::FileType::Manga; + + viewer->setMangaWithoutStoringSetting(isManga); + doubleMangaPageAction->setChecked(isManga); viewer->open(path, comic); enableActions();