mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Fix headers in the table view getting stuck in a non moveable state
The state can be saved with "sections moveable = false", so when it's restored the headers become non moveable, setting the property to true later should prevent this from happening.
This commit is contained in:
@ -147,12 +147,6 @@ void ClassicComicsView::setModel(ComicModel *model)
|
||||
if (model->rowCount() > 0)
|
||||
tableView->setCurrentIndex(model->index(0, 0));
|
||||
|
||||
tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
||||
#if QT_VERSION >= 0x050000
|
||||
tableView->horizontalHeader()->setSectionsMovable(true);
|
||||
#else
|
||||
tableView->horizontalHeader()->setMovable(true);
|
||||
#endif
|
||||
QStringList paths = model->getPaths(model->getCurrentPath()); // TODO ComicsView: get currentpath from somewhere currentPath());
|
||||
comicFlow->setImagePaths(paths);
|
||||
comicFlow->setMarks(model->getReadList());
|
||||
@ -197,7 +191,8 @@ void ClassicComicsView::setModel(ComicModel *model)
|
||||
}
|
||||
|
||||
tableView->resizeColumnsToContents();
|
||||
|
||||
tableView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
||||
tableView->horizontalHeader()->setSectionsMovable(true);
|
||||
tableView->horizontalHeader()->setStretchLastSection(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user