From d4e030811e2601b49b850659cb831b58166bceb3 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 26 May 2015 12:58:05 +0000 Subject: [PATCH] =?UTF-8?q?B2015-065:=20don=E2=80=99t=20duplicate=20Page?= =?UTF-8?q?=20~/Page=20Num=20in=20page=20number=20transitions=20B2015-065:?= =?UTF-8?q?=20Pass=20in=20correct=20transition=20type=20for=20resolving=20?= =?UTF-8?q?page=20number=20transitions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs | 2 +- PROMS/Volian.Controls.Library/DisplayTransition.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs index 3d7ff308..d1088f78 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/TransitionExt.cs @@ -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")) diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 6c027f3c..f076b1df 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -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());