From 54ef16e31819ade25fbe421ed657d83a9bc248c1 Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Tue, 30 Dec 2025 16:14:29 +0100 Subject: [PATCH] Skip saving table headers status if the model is empty It means the view isn't actually in a a state that can be shown to the user. --- YACReaderLibrary/classic_comics_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YACReaderLibrary/classic_comics_view.cpp b/YACReaderLibrary/classic_comics_view.cpp index 5eb2720f..66b602b9 100644 --- a/YACReaderLibrary/classic_comics_view.cpp +++ b/YACReaderLibrary/classic_comics_view.cpp @@ -357,6 +357,10 @@ void ClassicComicsView::saveTableHeadersStatus() return; } + if (model->rowCount() == 0) { + return; + } + settings->setValue(COMICS_VIEW_HEADERS, tableView->horizontalHeader()->saveState()); }