Added code to remove a font command combined with a comment in a link in StripRtfCommands
The initialization code was changed so that an invalid transition will not cause a crash If a MRU Item is deleted, and then selected from the menu, a message box will be displayed.
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -31,7 +32,13 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public MostRecentItem Add(int itemID)
|
||||
{
|
||||
return Add(new MostRecentItem(ItemInfo.Get(itemID)));
|
||||
ItemInfo tmp = ItemInfo.Get(itemID);
|
||||
if (tmp == null)
|
||||
{
|
||||
MessageBox.Show("This step no longer exists", "Invalid Most Recent Item", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return null;
|
||||
}
|
||||
return Add(new MostRecentItem(tmp));
|
||||
}
|
||||
public MostRecentItem Add(ItemInfo myItem)
|
||||
{
|
||||
|
Reference in New Issue
Block a user