mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive pictures: index local file name by canonical filname
The connection canonical filename to local filename was done via two maps: 1) canonical filename -> hash 2) hash -> local filename But the local filename was always queried from the canonical filename. Therefore, directly index the former with the latter. On startup, convert the old map to the new one. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5375eee4e6
commit
08962cb38d
5 changed files with 100 additions and 48 deletions
|
@ -999,7 +999,7 @@ void DiveListView::loadImageFromURL(QUrl url)
|
|||
stream.writeRawData(imageData.data(), imageData.length());
|
||||
imageFile.waitForBytesWritten(-1);
|
||||
imageFile.close();
|
||||
learnHash(url.toString(), imageFile.fileName(), hash.result());
|
||||
learnPictureFilename(url.toString(), imageFile.fileName());
|
||||
matchImagesToDives(QStringList(url.toString()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue