mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix opening a comic from the current/next comic banner in the grid view
This commit is contained in:
parent
ad036ec6ae
commit
91c9375dc1
@ -38,7 +38,7 @@ public slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void selected(unsigned int);
|
void selected(unsigned int);
|
||||||
void openComic();
|
void openComic(const ComicDB &comic, const ComicModel::Mode mode);
|
||||||
void comicRated(int, QModelIndex);
|
void comicRated(int, QModelIndex);
|
||||||
|
|
||||||
//Context menus
|
//Context menus
|
||||||
|
@ -398,7 +398,11 @@ void GridComicsView::selectIndex(int index)
|
|||||||
|
|
||||||
void GridComicsView::triggerOpenCurrentComic()
|
void GridComicsView::triggerOpenCurrentComic()
|
||||||
{
|
{
|
||||||
emit openComic();
|
if (model == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit openComic(currentComic, model->getMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridComicsView::rate(int index, int rating)
|
void GridComicsView::rate(int index, int rating)
|
||||||
|
@ -1840,11 +1840,18 @@ void LibraryWindow::checkEmptyFolder()
|
|||||||
void LibraryWindow::openComic()
|
void LibraryWindow::openComic()
|
||||||
{
|
{
|
||||||
if (!importedCovers) {
|
if (!importedCovers) {
|
||||||
auto libraryId = libraries.getId(selectedLibrary->currentText());
|
|
||||||
|
|
||||||
auto comic = comicsModel->getComic(comicsViewsManager->comicsView->currentIndex());
|
auto comic = comicsModel->getComic(comicsViewsManager->comicsView->currentIndex());
|
||||||
auto mode = comicsModel->getMode();
|
auto mode = comicsModel->getMode();
|
||||||
|
|
||||||
|
openComic(comic, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LibraryWindow::openComic(const ComicDB &comic, const ComicModel::Mode mode)
|
||||||
|
{
|
||||||
|
auto libraryId = libraries.getId(selectedLibrary->currentText());
|
||||||
|
|
||||||
OpenComicSource::Source source;
|
OpenComicSource::Source source;
|
||||||
|
|
||||||
if (mode == ComicModel::ReadingList) {
|
if (mode == ComicModel::ReadingList) {
|
||||||
@ -1866,7 +1873,6 @@ void LibraryWindow::openComic()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void LibraryWindow::setCurrentComicsStatusReaded(YACReaderComicReadStatus readStatus)
|
void LibraryWindow::setCurrentComicsStatusReaded(YACReaderComicReadStatus readStatus)
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#include "comic_query_result_processor.h"
|
#include "comic_query_result_processor.h"
|
||||||
#include "folder_query_result_processor.h"
|
#include "folder_query_result_processor.h"
|
||||||
|
|
||||||
|
#include "comic_model.h"
|
||||||
|
|
||||||
#include <future>
|
#include <future>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@ -77,7 +79,6 @@ class YACReaderHistoryController;
|
|||||||
class EmptyLabelWidget;
|
class EmptyLabelWidget;
|
||||||
class EmptySpecialListWidget;
|
class EmptySpecialListWidget;
|
||||||
class EmptyReadingListWidget;
|
class EmptyReadingListWidget;
|
||||||
class YACReaderComicsViewsManager;
|
|
||||||
|
|
||||||
namespace YACReader {
|
namespace YACReader {
|
||||||
class TrayIconController;
|
class TrayIconController;
|
||||||
@ -315,6 +316,7 @@ public slots:
|
|||||||
void selectSubfolder(const QModelIndex &mi, int child);
|
void selectSubfolder(const QModelIndex &mi, int child);
|
||||||
void checkEmptyFolder();
|
void checkEmptyFolder();
|
||||||
void openComic();
|
void openComic();
|
||||||
|
void openComic(const ComicDB &comic, const ComicModel::Mode mode);
|
||||||
void createLibrary();
|
void createLibrary();
|
||||||
void create(QString source, QString dest, QString name);
|
void create(QString source, QString dest, QString name);
|
||||||
void showAddLibrary();
|
void showAddLibrary();
|
||||||
|
@ -146,7 +146,7 @@ void YACReaderComicsViewsManager::doComicsViewConnections()
|
|||||||
connect(comicsView, SIGNAL(comicRated(int, QModelIndex)), libraryWindow->comicsModel, SLOT(updateRating(int, QModelIndex)));
|
connect(comicsView, SIGNAL(comicRated(int, QModelIndex)), libraryWindow->comicsModel, SLOT(updateRating(int, QModelIndex)));
|
||||||
connect(libraryWindow->showHideMarksAction, SIGNAL(toggled(bool)), comicsView, SLOT(setShowMarks(bool)));
|
connect(libraryWindow->showHideMarksAction, SIGNAL(toggled(bool)), comicsView, SLOT(setShowMarks(bool)));
|
||||||
connect(comicsView, SIGNAL(selected(unsigned int)), libraryWindow, SLOT(openComic()));
|
connect(comicsView, SIGNAL(selected(unsigned int)), libraryWindow, SLOT(openComic()));
|
||||||
connect(comicsView, SIGNAL(openComic()), libraryWindow, SLOT(openComic()));
|
connect(comicsView, SIGNAL(openComic(const ComicDB &, const ComicModel::Mode)), libraryWindow, SLOT(openComic(const ComicDB &, const ComicModel::Mode)));
|
||||||
|
|
||||||
connect(libraryWindow->selectAllComicsAction, SIGNAL(triggered()), comicsView, SLOT(selectAll()));
|
connect(libraryWindow->selectAllComicsAction, SIGNAL(triggered()), comicsView, SLOT(selectAll()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user