mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
This again :/, fixing this needs a separated feature branch and long debuging session.
This commit is contained in:
parent
939a52dd6e
commit
4fcd7225da
@ -157,8 +157,6 @@ void GridComicsView::setToolBar(QToolBar *toolBar)
|
||||
|
||||
void GridComicsView::setModel(ComicModel *model)
|
||||
{
|
||||
BOOL setModel = model != this->model;
|
||||
|
||||
if(model == NULL)
|
||||
return;
|
||||
|
||||
@ -171,8 +169,7 @@ void GridComicsView::setModel(ComicModel *model)
|
||||
|
||||
_selectionModel = new QItemSelectionModel(model);
|
||||
|
||||
if(setModel)
|
||||
ctxt->setContextProperty("comicsList", model);
|
||||
ctxt->setContextProperty("comicsList", model);
|
||||
ctxt->setContextProperty("comicsSelection", _selectionModel);
|
||||
ctxt->setContextProperty("contextMenuHelper",this);
|
||||
ctxt->setContextProperty("comicsSelectionHelper", this);
|
||||
|
@ -48,8 +48,6 @@ void InfoComicsView::setToolBar(QToolBar *toolBar)
|
||||
|
||||
void InfoComicsView::setModel(ComicModel *model)
|
||||
{
|
||||
BOOL setModel = model != this->model;
|
||||
|
||||
if(model == NULL)
|
||||
return;
|
||||
|
||||
@ -62,12 +60,7 @@ void InfoComicsView::setModel(ComicModel *model)
|
||||
|
||||
_selectionModel = new QItemSelectionModel(model);*/
|
||||
|
||||
//TODO fix crash in the following line on comics views switch
|
||||
|
||||
int row = currentIndex().row();
|
||||
|
||||
if(setModel)
|
||||
ctxt->setContextProperty("comicsList", model);
|
||||
ctxt->setContextProperty("comicsList", model);
|
||||
ctxt->setContextProperty("backgroundImage", this->model->data(this->model->index(0, 0), ComicModel::CoverPathRole));
|
||||
|
||||
/*ctxt->setContextProperty("comicsSelection", _selectionModel);
|
||||
|
@ -1267,6 +1267,7 @@ void LibraryWindow::loadLibrary(const QString & name)
|
||||
|
||||
void LibraryWindow::loadCoversFromCurrentModel()
|
||||
{
|
||||
comicsViewsManager->comicsView->setModel(new ComicModel()); //TODO fix this
|
||||
comicsViewsManager->comicsView->setModel(comicsModel);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user