added a check for a null reference
This commit is contained in:
parent
414378e0f3
commit
c52bda13f3
@ -284,7 +284,7 @@ namespace VEPROMS.CSLA.Library
|
||||
public ItemInfo InsertSiblingBefore(string text, string number)
|
||||
{
|
||||
ItemInfo tmp = null;
|
||||
if (FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate)
|
||||
if (!IsSection && (FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate))
|
||||
tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)MyContent.Type);
|
||||
else
|
||||
tmp = NewItemInfoFetch(ItemID, EAddpingPart.Before, number, text, null, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
||||
@ -410,7 +410,7 @@ namespace VEPROMS.CSLA.Library
|
||||
public ItemInfo InsertSiblingAfter(string text, string number, int? type)
|
||||
{
|
||||
ItemInfo tmp = null;
|
||||
if (FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate)
|
||||
if (!IsSection &&(FormatStepData.UseSmartTemplate || MyHLS.FormatStepData.UseSmartTemplate))
|
||||
tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.After, (int)MyContent.Type);
|
||||
else
|
||||
tmp = NewItemInfoFetch(ItemID, EAddpingPart.After, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
||||
|
@ -57,6 +57,7 @@ namespace Volian.Controls.Library
|
||||
set
|
||||
{
|
||||
_MyStepPanel.SelectedEditItem = _MyStepPanel.GetEditItem(value);
|
||||
if (_MyStepPanel.SelectedEditItem != null)
|
||||
_MyStepPanel.SelectedEditItem.ItemSelect();
|
||||
if (!_MyStepPanel.ItemSelectionChangeShown) _MyStepPanel.OnItemSelectedChanged(this, new ItemSelectedChangedEventArgs(_MyStepPanel.SelectedEditItem));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user