From 7443ed43be916aa486caf90be5f2c2d83f78a7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 12 Dec 2015 15:46:30 +0100 Subject: [PATCH] ugly fix for an ugly bug, crash on grid view setModel when switching comics views --- YACReaderLibrary/library_window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index e95ffc39..f89dfa23 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -1325,6 +1325,9 @@ void LibraryWindow::loadLibrary(const QString & name) void LibraryWindow::loadCoversFromCurrentModel() { + //TODO this is a workaround for the crash in GridComicsView::setModel crash on views switching + if(typeid(*comicsView) == typeid(GridComicsView)) + comicsView->setModel(new ComicModel()); comicsView->setModel(comicsModel); }