This commit is contained in:
Kathy Ruffing 2009-11-03 16:41:04 +00:00
parent 7801cdadf9
commit 91d6340f9d

View File

@ -192,7 +192,8 @@ namespace Volian.Controls.Library
try try
{ {
FormatInfo formatInfo = _MyItemInfo.ActiveFormat; FormatInfo formatInfo = _MyItemInfo.ActiveFormat;
_MyItem = _MyItemInfo.Get(); using (_MyItem = _MyItemInfo.Get())
{
// check for different text, i.e. text from this itm doesn't match // check for different text, i.e. text from this itm doesn't match
// original text, a change occurred in database, but not from this user. // original text, a change occurred in database, but not from this user.
if (OriginalText != EditText) if (OriginalText != EditText)
@ -248,8 +249,10 @@ namespace Volian.Controls.Library
} }
_MyItem.Save(); _MyItem.Save();
} }
_MyItem = null;
OriginalText = modtext; OriginalText = modtext;
} }
}
catch (Exception ex) catch (Exception ex)
{ {
Console.WriteLine("Save Failed with error: {0}", ex.Message); Console.WriteLine("Save Failed with error: {0}", ex.Message);