forked from teamnwah/openmw-tes3coop
Fast forward to the last page in the journal when opening it
This commit is contained in:
parent
d16bb26a48
commit
a33e6b9c35
2 changed files with 13 additions and 0 deletions
|
@ -152,6 +152,9 @@ struct MWGui::JournalViewModelImpl : JournalViewModel
|
||||||
if (active_only && i->second.isFinished ())
|
if (active_only && i->second.isFinished ())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/// \todo quest.getName() is broken? returns empty string
|
||||||
|
//const MWDialogue::Quest& quest = i->second;
|
||||||
|
|
||||||
visitor (reinterpret_cast <QuestId> (&i->second), toUtf8Span (i->first));
|
visitor (reinterpret_cast <QuestId> (&i->second), toUtf8Span (i->first));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,16 @@ namespace
|
||||||
journalBook = createJournalBook ();
|
journalBook = createJournalBook ();
|
||||||
|
|
||||||
pushBook (journalBook, 0);
|
pushBook (journalBook, 0);
|
||||||
|
|
||||||
|
// fast forward to the last page
|
||||||
|
if (!mStates.empty ())
|
||||||
|
{
|
||||||
|
unsigned int & page = mStates.top ().mPage;
|
||||||
|
page = mStates.top().mBook->pageCount()-1;
|
||||||
|
if (page%2)
|
||||||
|
--page;
|
||||||
|
}
|
||||||
|
updateShowingPages();
|
||||||
}
|
}
|
||||||
|
|
||||||
void close()
|
void close()
|
||||||
|
|
Loading…
Reference in a new issue