Fix B2016-034: New Procedure/New Word Section creation causes new procedure to disappear from tree view
This commit is contained in:
@@ -173,7 +173,7 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyItem", true);
|
||||
if (_MyItem == null && _ItemID != null) _MyItem = ItemInfo.Get((int)_ItemID);
|
||||
if (_MyItem == null && _ItemID != null) _MyItem = ProcedureInfo.Get((int)_ItemID);
|
||||
return _MyItem;
|
||||
}
|
||||
}
|
||||
|
@@ -128,7 +128,17 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyPrevious", true);
|
||||
if (_MyPrevious == null && _PreviousID != null) _MyPrevious = ItemInfo.Get((int)_PreviousID);
|
||||
if (_MyPrevious == null && _PreviousID != null)
|
||||
{
|
||||
if (this is ProcedureInfo)
|
||||
_MyPrevious = ProcedureInfo.Get((int)_PreviousID);
|
||||
else if (this is SectionInfo)
|
||||
_MyPrevious = SectionInfo.Get((int)_PreviousID);
|
||||
else if (this is StepInfo)
|
||||
_MyPrevious = StepInfo.Get((int)_PreviousID);
|
||||
else
|
||||
_MyPrevious = ItemInfo.Get((int)_PreviousID);
|
||||
}
|
||||
return _MyPrevious;
|
||||
}
|
||||
set
|
||||
@@ -430,7 +440,15 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Factory Methods
|
||||
private static int _ItemInfoUnique = 0;
|
||||
private static int ItemInfoUnique
|
||||
{ get { return ++_ItemInfoUnique; } }
|
||||
{
|
||||
get
|
||||
{
|
||||
int ui = ++_ItemInfoUnique;
|
||||
//Useful for debug to identify where item is being created:
|
||||
//if (ui == 73) Console.WriteLine("here");
|
||||
return ui;
|
||||
}
|
||||
}
|
||||
private int _MyItemInfoUnique = ItemInfoUnique;
|
||||
public int MyItemInfoUnique // Absolutely Unique ID - Info
|
||||
{ get { return _MyItemInfoUnique; } }
|
||||
|
Reference in New Issue
Block a user