Added a null reference check for selectedDVI on the tc_PanelTabDisplay() function.

Added logic to skip the checks for changed integrated graphics (figures) when the RO database has none.
This commit is contained in:
John Jenko 2016-08-03 18:52:14 +00:00
parent 56ab02c3f7
commit ac47021609
2 changed files with 15 additions and 9 deletions

View File

@ -2889,6 +2889,7 @@ namespace VEPROMS
}
private void tc_PanelTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
{
if (_SelectedDVI == null) return;
if (args.PanelTabName == "Bookmarks")
{
toolsPanel.Expanded = true;

View File

@ -390,6 +390,8 @@ namespace VEPROMS.CSLA.Library
/// <param name="ChangedFiles">List of Files that have changed</param>
/// <param name="roids">List of ROIDs with changed figures</param>
private static void FindChangedFiles(ROFSTLookup.rochild[] rochild,List<string> ChangedFiles, List<string> roids)
{
if (ChangedFiles != null)
{
for (int i = 0; i < rochild.Length; i++)
{
@ -403,6 +405,7 @@ namespace VEPROMS.CSLA.Library
if (rochild[i].children != null) FindChangedFiles(rochild[i].children, ChangedFiles, roids);
}
}
}
/// <summary>
/// Get a List of figures which have changed
/// </summary>
@ -411,6 +414,7 @@ namespace VEPROMS.CSLA.Library
/// <returns>List of Files which have changed (DTS)</returns>
private static List<string> GetChangedFigures(ROFstInfo origROFst, ROFstInfo rofst)
{
if (origROFst.ROFstFigures == null) return null;
Dictionary<string,int> orig = new Dictionary<string,int>();
foreach (FigureInfo fi in origROFst.ROFstFigures)
{
@ -463,6 +467,7 @@ namespace VEPROMS.CSLA.Library
List<string> delList = new List<string>();
List<string> chgList = newLU.GetValueDifferences(origLU, ref delList);
// Any figures which have been changed will be included in the list of values that have changed.
if (MyChangedFigureROIDs != null)
foreach (string roid in MyChangedFigureROIDs)
if (!chgList.Contains(roid))
chgList.Add(roid);
@ -522,7 +527,7 @@ namespace VEPROMS.CSLA.Library
foreach (string chg in chgList)
{
string padroid = chg.Length <= 12 ? chg + "0000" : chg;
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Updating DRO Values");
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Updating RO Values");
if (activeDRoids.Contains(chg.Substring(0, 12)))
{
ROFSTLookup.rochild roch = newLU.GetRoChild(chg);
@ -587,7 +592,7 @@ namespace VEPROMS.CSLA.Library
{
foreach (DROUsageInfo droUsg in Daffected)
{
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Removing Old DRO Values");
if (myProgressBarRefresh != null) myProgressBarRefresh(++iCount, chgList.Count, "Removing Old RO Values");
Pdf.DeleteAll(droUsg.DocID);
}
}