B2025-035-Hold-Procedure-Set-Bug #571
@@ -524,7 +524,55 @@ namespace Volian.Controls.Library
 | 
			
		||||
			ItemInfo secitm = (ItemInfo)cbTranSects.SelectedItem;
 | 
			
		||||
			bool hasMetaSubs = secitm.IsSection && secitm.Sections != null && secitm.Sections.Count > 0;
 | 
			
		||||
			bool editSteps = !hasMetaSubs || (secitm.MyConfig is SectionConfig && (secitm.MyConfig as SectionConfig).SubSection_Edit == "Y");
 | 
			
		||||
			if (!editSteps) return;
 | 
			
		||||
			if (!editSteps)
 | 
			
		||||
			{
 | 
			
		||||
				if (secitm.Sections != null)
 | 
			
		||||
				{
 | 
			
		||||
					// if the transition to point is a section or procedure, just return
 | 
			
		||||
					if (startitm.MyContent.Type < 20000) return;
 | 
			
		||||
					groupPanelTranstionSteps.Style.BackColor = Color.Cornsilk;
 | 
			
		||||
					// For the tree view, use parent, unless already at HLS.  If at HLS, use this level.
 | 
			
		||||
					//ItemInfo selitm2 = startitm.MyHLS;
 | 
			
		||||
					ItemInfo selSubSec = secitm.Sections[0];
 | 
			
		||||
 | 
			
		||||
						// The commented out code below is for displaying the steps from the first sub-section B2025-035
 | 
			
		||||
					//ItemInfo subSelStep = selSubSec.Steps[0];
 | 
			
		||||
					//E_TransUI etm2 = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
 | 
			
		||||
					//if (subSelStep.IsInRNO)
 | 
			
		||||
					//	startitm = subSelStep.FirstSibling;   // if in RNO tree, start out with HLS
 | 
			
		||||
					//else
 | 
			
		||||
					//	startitm = subSelStep != null ? subSelStep.FirstSibling : startitm.FirstSibling;
 | 
			
		||||
 | 
			
		||||
						// B2025-035
 | 
			
		||||
					ItemInfo subSelStep = secitm.Sections[0];
 | 
			
		||||
					E_TransUI etm2 = (E_TransUI)_CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[listBoxTranFmt.SelectedIndex].TransUI;
 | 
			
		||||
					if (subSelStep.IsInRNO)
 | 
			
		||||
						startitm = subSelStep.FirstSibling;   // if in RNO tree, start out with HLS
 | 
			
		||||
					else
 | 
			
		||||
						startitm = subSelStep != null ? subSelStep.FirstSibling : startitm.FirstSibling;
 | 
			
		||||
 | 
			
		||||
						// B2025-035
 | 
			
		||||
					bool setsel2 = false;
 | 
			
		||||
					while (startitm != null)
 | 
			
		||||
					{
 | 
			
		||||
						VETreeNode tvn = new VETreeNode(startitm, false);
 | 
			
		||||
						tvn.Tag = startitm;
 | 
			
		||||
						int active = this.tvTran.Nodes.Add(tvn);
 | 
			
		||||
						if (subSelStep != null && startitm.ItemID == subSelStep.ItemID)
 | 
			
		||||
						{
 | 
			
		||||
							tvTran.SelectedNode = tvTran.Nodes[active];
 | 
			
		||||
							setsel2 = true;
 | 
			
		||||
						}
 | 
			
		||||
						startitm = startitm.GetNext();
 | 
			
		||||
					}
 | 
			
		||||
					if (!setsel2) tvTran.SelectedNode = tvTran.Nodes[0];
 | 
			
		||||
					tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand);
 | 
			
		||||
					// bug fix. TreeView needs the next two lines to properly display the bottom node. jsj 01/08/2010
 | 
			
		||||
					tvTran.ItemHeight++;
 | 
			
		||||
					tvTran.ItemHeight--;
 | 
			
		||||
				}
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
			// if the transition to point is a section or procedure, just return
 | 
			
		||||
			if (startitm.MyContent.Type < 20000) return;
 | 
			
		||||
@@ -934,6 +982,12 @@ namespace Volian.Controls.Library
 | 
			
		||||
			//	a different section was selected, if step section, update step list, otherwise, empty
 | 
			
		||||
			//	it & disable.
 | 
			
		||||
			ItemInfo secitm = (ItemInfo)cbTranSects.SelectedItem;
 | 
			
		||||
 | 
			
		||||
			//if (secitm.IsStepSection)
 | 
			
		||||
			//{
 | 
			
		||||
			//	cbTranSects.SelectedItem.Sections[0];
 | 
			
		||||
 | 
			
		||||
			//}
 | 
			
		||||
				if (!secitm.IsStepSection)
 | 
			
		||||
			{
 | 
			
		||||
				tvTran.Nodes.Clear();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user