From 1ae09f7272b74d1dce3f8ac26b90afafd0f6a45f Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 20 May 2015 13:48:15 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20B2015-065=20and=20fix=20for=20setting?= =?UTF-8?q?=20default=20section=20in=20section=20combo=20box=20Shortened?= =?UTF-8?q?=20page=20length=20of=20Attachment=20section;=20added=20Transit?= =?UTF-8?q?ion=20to=20Default=20Section=E2=80=99s=20step.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Formats/fmtall/AEPall.xml | Bin 66282 -> 66616 bytes .../DisplayTransition.cs | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PROMS/Formats/fmtall/AEPall.xml b/PROMS/Formats/fmtall/AEPall.xml index 7737866b0441297f59145eeec8ca9798f00393c8..30c6bdab324af8919d1d92db4d01341f2fb54318 100644 GIT binary patch delta 109 zcmaFW%Ce(_Wy8H5egy^;I61Ldo!OAVc=E>v>B$jIPLsdYD^0%8B*a|8kUx1oi#WRz zLq0^Je?m9U`RFGI E08Eo4=>Px# delta 43 zcmV+`0M!4uhy?0|1hC$Wl1~V;G>%?m12_OUvk~ZX0+QoQv+DUI0h93WAhVeEpbf4! B6oLQ% diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 5672b537..6c027f3c 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -172,7 +172,7 @@ namespace Volian.Controls.Library if (secStartId > -1) { secitm = ItemInfo.Get(secStartId); - selitm = (secitm.Steps.Count > 0) ? secitm.Steps[0] : null; + selitm = (secitm.Steps != null && secitm.Steps.Count > 0) ? secitm.Steps[0] : null; } else btnTranSave.Enabled = false; // if there is an invalid section start - don't allow save. @@ -181,7 +181,7 @@ namespace Volian.Controls.Library // Fill step items, passing in the active step to the selected item, or the first // step if the selection was not at the step level. ItemInfo stpitm = null; - if (selitm.MyContent.Type >= 20000) + if (selitm != null && selitm.MyContent.Type >= 20000) { if (_DoingRange) @@ -504,7 +504,7 @@ namespace Volian.Controls.Library private void cbTranProcsFillIn(ItemInfo prcitm) { cbTranProcs.Items.Clear(); - ItemInfo selitm = prcitm; // this is the selected 'section' + ItemInfo selitm = prcitm; // this is the selected 'procedure' prcitm = prcitm.FirstSibling; while (prcitm != null) { @@ -747,7 +747,10 @@ namespace Volian.Controls.Library int sectstartid = FindSectionStart(_CurrentProcedure); if (sectstartid==-1) btnTranSave.Enabled = false; // if there is an invalid section start - don't allow save. IList chldrn = _CurrentProcedure.GetChildren(); - if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], secitm==null?sectstartid:secitm.ItemID, true); //sectstartid); + int secIdForCbSect = secitm == null ? sectstartid : secitm.ItemID; + // if this transition format requires the default section, use it: + if ((etmnew & E_TransUI.SectDefault) == E_TransUI.SectDefault) secIdForCbSect = sectstartid; + if (chldrn != null && chldrn.Count > 0) cbTranSectsFillIn((ItemInfo)chldrn[0], secIdForCbSect, true); //sectstartid); } _TranFmtIndx = listBoxTranFmt.SelectedIndex; groupPanelTranFmt.Style.BackColor = (_CurTrans == null && _TranFmtIndx == 0) ? Color.Yellow : Color.Orange;