scan document if pagecount metadata contains the value 0, as it could prevent the document to be displayed in the Document Mode (didn't found ways to get into this scenario, but still)

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent 5031b105a1
commit ab74e1d0da
  1. 6
      src/core/UBPersistenceManager.cpp

@ -186,7 +186,11 @@ void UBPersistenceManager::createDocumentProxiesStructure(const QFileInfoList &c
if (metadatas.contains(UBSettings::documentPageCount))
{
docProxy->setPageCount(metadatas.value(UBSettings::documentPageCount).toInt());
int pageCount = metadatas.value(UBSettings::documentPageCount).toInt();
if (pageCount == 0)
pageCount = sceneCount(docProxy);
docProxy->setPageCount(pageCount);
}
else
{

Loading…
Cancel
Save