Added StepRTB Closed logic to disposing

This commit is contained in:
Rich
2011-08-23 18:41:06 +00:00
parent 15d7ab597c
commit fab3c49244
2 changed files with 3 additions and 2 deletions

View File

@@ -1076,7 +1076,7 @@ namespace VEPROMS
private StepRTB _LastStepRTB = null;
private void tc_ItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
{
if (_LastStepRTB != null && !_LastStepRTB.Disposing)
if (_LastStepRTB != null && !_LastStepRTB.Disposing && !_LastStepRTB.Closed)
_LastStepRTB.EditModeChanged -= new StepRTBEvent(_LastStepRTB_EditModeChanged);
_LastStepRTB = args != null && args.MyEditItem != null ? args.MyEditItem.MyStepRTB : null;
if (_LastStepRTB != null) _LastStepRTB.EditModeChanged += new StepRTBEvent(_LastStepRTB_EditModeChanged);