Skip saving table headers status if the model is empty
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt5) (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / macOS (Qt5) (push) Has been cancelled
Build / Windows x64 (Qt5) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Windows x86 (Qt5) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled

It means the view isn't actually in a a state that can be shown to the user.
This commit is contained in:
luisangelsm
2025-12-30 16:14:29 +01:00
parent 7927975902
commit 54ef16e318

View File

@ -357,6 +357,10 @@ void ClassicComicsView::saveTableHeadersStatus()
return;
}
if (model->rowCount() == 0) {
return;
}
settings->setValue(COMICS_VIEW_HEADERS, tableView->horizontalHeader()->saveState());
}