B2015-065: don’t duplicate Page ~/Page Num in page number transitions

B2015-065: Pass in correct transition type for resolving page number transitions
This commit is contained in:
Kathy Ruffing 2015-05-26 12:58:05 +00:00
parent 64752c1e33
commit d4e030811e
2 changed files with 4 additions and 2 deletions

View File

@ -778,7 +778,7 @@ namespace VEPROMS.CSLA.Library
return "Invalid Transition Destination";
TransitionBuilder tb = SetupTransitionBuilder(formatInfo, fromInfo, tranType, toItem,
toItem.ItemID==rangeItem.ItemID && !toItem.IsHigh?toItem.LastSibling:rangeItem);
if (pagenum && (tranType==1||tranType==2||tranType==4))
if (pagenum && (tranType==1||tranType==2||tranType==4) && !tb._TransFormat.Contains("{Page Num}"))
{
// if range transition, the page number token needs to go after the first step, else it's at the end:
if (tranType == 2 && tb._TransFormat.Contains("{First Step"))

View File

@ -1129,7 +1129,9 @@ namespace Volian.Controls.Library
return;
}
bool doTranmod = cbPageNum.Visible && cbPageNum.Checked;
trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex, toItem, rangeItem ?? toItem, doTranmod);
int trtype = (int)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].Type;
trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, trtype, toItem, rangeItem ?? toItem, doTranmod);
int ss = MyRTB.SelectionStart;// Remember where the link is being added
int sl = MyRTB.SelectionLength;
MyRTB.OnReturnToEditor(this, new EventArgs());