parseBookmarkKey restituisce QVariantMap (i puntatori int* non sono marshallabili da QML — il segno non si ripristinava mai)
This commit is contained in:
@@ -259,10 +259,15 @@ Page {
|
||||
var key = appSettings.bookmarkKey(page.bookId, page.bookFormat)
|
||||
var ch = 0
|
||||
var fr = 0.0
|
||||
if (key.length > 0 && book.parseBookmarkKey(key, ch, fr)) {
|
||||
page.currentChapter = Math.max(0, Math.min(ch, book.chapterCount - 1))
|
||||
page.chapterFraction = fr
|
||||
if (key.length > 0) {
|
||||
var r = book.parseBookmarkKey(key)
|
||||
if (r && r.hasOwnProperty("chapter")) {
|
||||
ch = Math.max(0, Math.min(r.chapter, book.chapterCount - 1))
|
||||
fr = r.fraction
|
||||
}
|
||||
}
|
||||
page.currentChapter = ch
|
||||
page.chapterFraction = fr
|
||||
loadChapter()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user