mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Merge pull request #124 from cwalther/gotopage
Fix Relto books not remembering last open page
This commit is contained in:
@ -1743,10 +1743,8 @@ void pfJournalBook::IHandleCheckClick( uint32_t idx, pfBookData::WhichSide wh
|
|||||||
void pfJournalBook::GoToPage( uint32_t pageNumber )
|
void pfJournalBook::GoToPage( uint32_t pageNumber )
|
||||||
{
|
{
|
||||||
// Put us here, but only on an even page (odd pages go on the right, y'know)
|
// Put us here, but only on an even page (odd pages go on the right, y'know)
|
||||||
if (pageNumber < fPageStarts.Count())
|
// (no need for a range check, going past the end simply puts you on a blank page, able to go backward but not forward)
|
||||||
fCurrentPage = pageNumber & ~0x00000001;
|
fCurrentPage = pageNumber & ~0x00000001;
|
||||||
else
|
|
||||||
fCurrentPage = 0;
|
|
||||||
fVisibleLinks.Reset();
|
fVisibleLinks.Reset();
|
||||||
IRenderPage( fCurrentPage, pfJournalDlgProc::kTagLeftDTMap );
|
IRenderPage( fCurrentPage, pfJournalDlgProc::kTagLeftDTMap );
|
||||||
IRenderPage( fCurrentPage + 1, pfJournalDlgProc::kTagRightDTMap );
|
IRenderPage( fCurrentPage + 1, pfJournalDlgProc::kTagRightDTMap );
|
||||||
@ -2609,7 +2607,7 @@ void pfJournalBook::IRenderPage( uint32_t page, uint32_t whichDTMap, hsBool s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hsAssert(page < fPageStarts.GetCount(), "UnInitialized page start!");
|
hsAssert(page < fPageStarts.GetCount() || page > fLastPage, "UnInitialized page start!");
|
||||||
if( page <= fLastPage
|
if( page <= fLastPage
|
||||||
&& page < fPageStarts.GetCount()) // Added this as a crash-prevention bandaid - MT
|
&& page < fPageStarts.GetCount()) // Added this as a crash-prevention bandaid - MT
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user