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)
|
public ItemInfo InsertSiblingBefore(string text, string number)
|
||||||
{
|
{
|
||||||
ItemInfo tmp = null;
|
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);
|
tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.Before, (int)MyContent.Type);
|
||||||
else
|
else
|
||||||
tmp = NewItemInfoFetch(ItemID, EAddpingPart.Before, number, text, null, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
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)
|
public ItemInfo InsertSiblingAfter(string text, string number, int? type)
|
||||||
{
|
{
|
||||||
ItemInfo tmp = null;
|
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);
|
tmp = InsertSmartTemplateSteps(text, number, tmp, EAddpingPart.After, (int)MyContent.Type);
|
||||||
else
|
else
|
||||||
tmp = NewItemInfoFetch(ItemID, EAddpingPart.After, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
tmp = NewItemInfoFetch(ItemID, EAddpingPart.After, number, text, type, null, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
||||||
|
@ -57,7 +57,8 @@ namespace Volian.Controls.Library
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_MyStepPanel.SelectedEditItem = _MyStepPanel.GetEditItem(value);
|
_MyStepPanel.SelectedEditItem = _MyStepPanel.GetEditItem(value);
|
||||||
_MyStepPanel.SelectedEditItem.ItemSelect();
|
if (_MyStepPanel.SelectedEditItem != null)
|
||||||
|
_MyStepPanel.SelectedEditItem.ItemSelect();
|
||||||
if (!_MyStepPanel.ItemSelectionChangeShown) _MyStepPanel.OnItemSelectedChanged(this, new ItemSelectedChangedEventArgs(_MyStepPanel.SelectedEditItem));
|
if (!_MyStepPanel.ItemSelectionChangeShown) _MyStepPanel.OnItemSelectedChanged(this, new ItemSelectedChangedEventArgs(_MyStepPanel.SelectedEditItem));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user