B2018-087 - Check the ItemIDs in the Command Window before trying to print
B2018-091 - PROMS will not close if the user has only opened an MSWord section
This commit is contained in:
parent
0e8ebc1001
commit
be7d9da0f0
@ -1162,14 +1162,23 @@ namespace VEPROMS
|
||||
// B2017-212 If the user uses the X button in Word to close the word attachment, PROMS thinks that the user wants to close out of PROMS as well
|
||||
// trap for this and close only the Word tab in PROMS
|
||||
// B2017-214 added a null reference check
|
||||
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyDSOTabPanel != null)
|
||||
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyDSOTabPanel != null && tc._MyDisplayTabItems.Count > 0)
|
||||
{
|
||||
string stk = Volian.Base.Library.vlnStackTrace.StackToString();
|
||||
if (!stk.Contains("MouseUp") && !stk.Contains("ButtonDown") && !stk.Contains("Exception"))
|
||||
{
|
||||
e.Cancel = true;
|
||||
tc.CloseTabItem(tc.SelectedDisplayTabItem);
|
||||
return;
|
||||
// B2018-091 Allow PROMS to close if only MSWord sections have been opened.
|
||||
int n = tc._MyDisplayTabItems.Count;
|
||||
while (n-- > 0 && tc._MyDisplayTabItems.Count > 0)
|
||||
{
|
||||
tc.CloseTabItem(tc.SelectedDisplayTabItem);
|
||||
}
|
||||
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyDSOTabPanel != null && tc._MyDisplayTabItems.Count > 0)
|
||||
{
|
||||
_MyLog.WarnFormat(string.Format("Stack Does not contain a MouseUp, a ButtonDown, an Exception\r\n" +
|
||||
"PROMS will Not Exit. Stack : \r\n{0}", stk));
|
||||
e.Cancel = true; // If Display Items still exist don't close.
|
||||
}
|
||||
}
|
||||
}
|
||||
//C2015-022 Separate Windows - if child windows are open and we are closing the main PROMS window, give user a chance to not close PROMS and that child windows
|
||||
@ -1846,7 +1855,7 @@ namespace VEPROMS
|
||||
if(id != "")
|
||||
{
|
||||
ItemInfo ii = GetItemInfoFromString(id);
|
||||
if (!dicProcs.ContainsKey(ii.MyProcedure.ItemID))
|
||||
if (ii != null && !dicProcs.ContainsKey(ii.MyProcedure.ItemID))// B2018-087 - Don't fail if it doesn't exist
|
||||
dicProcs.Add(ii.MyProcedure.ItemID, ii.MyProcedure);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user