From 738ea466b6ad1e56bd67e866f89b95cdd2c57235 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 31 Aug 2017 20:57:25 +0000 Subject: [PATCH] B2017-193 Added a Command Line flag /NoMRU that causes the Most Recently Used List not to be loaded. Sometimes PROMS will work for one user and not for another and the cause is something in the Most Recent Used List. This flag clears the Most Recent Used List B2017-193 Error occured when a section in the MRU was being loaded as an iteminfo --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 6 ++++-- PROMS/Volian.Print.Library/vlnParagraph.cs | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index a4f8c93b..0f880328 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1429,8 +1429,10 @@ namespace VEPROMS // See if any database 'changes' need done and do them: MakeDatabaseChanges(); - - _MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"])); + if (Volian.Base.Library.VlnSettings.GetCommandFlag("NOMRU")) // B2017-193 Error occured when a section in the MRU was being loaded as an iteminfo + _MyMRIList = new MostRecentItemList(); + else + _MyMRIList = MostRecentItemList.GetMRILst((System.Collections.Specialized.StringCollection)(Properties.Settings.Default["MRIList"])); _MyMRIList.AfterRemove += new ItemInfoEvent(_MyMRIList_AfterRemove); SetupMRU(); // if the user selected to "Remember Last" (was "Save Expanded") then use the MRU list to diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 03b57260..09671bb1 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2306,6 +2306,8 @@ namespace Volian.Print.Library while (ii != null) { SectionInfo supInfoSect = ii.ActiveSection as SectionInfo; + // B2017-193 Error occured when a section in the MRU was being loaded as an iteminfo + if (supInfoSect == null) supInfoSect = SectionInfo.Get(ii.ActiveSection.ItemID); // if there is a pagebreak on this step section step, quit looking for supinfos. The // break has to occur here. if (supInfoSect.StepSectPageBreaks.Contains(ii.ItemID)) return -1;