Revision: 2398
http://amis.svn.sourceforge.net/amis/?rev=2398&view=rev
Author: marisademeglio
Date: 2008-03-10 11:44:53 -0700 (Mon, 10 Mar 2008)
Log Message:
-----------
previous section works
Modified Paths:
--------------
branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp
Modified: branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp
===================================================================
--- branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp 2008-03-10 18:22:58 UTC (rev 2397)
+++ branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp 2008-03-10 18:44:53 UTC (rev 2398)
@@ -274,7 +274,10 @@
amis::dtb::nav::NavPoint* amis::dtb::nav::NavModel::previousSection(int currentPlayOrder)
{
- int idx = currentPlayOrder - 1;
+ //minus 2 because: play order is 1-based while our list is 0-based
+ //so a node with a play order of 10 will be in position 9
+ //and we want to start looking backwards from position 8
+ int idx = currentPlayOrder - 2;
if (idx >= mPlayOrderList.size() || idx <= 0) return NULL;
for (int i = idx; i >=0; i--)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|