B2026-057 - Issue when ROs are out of date and swapping between sets – sometimes asked if want to update ROs twice if said no the first time.

This commit is contained in:
2026-06-29 09:51:48 -04:00
parent f27616ce1f
commit 94db524a11
+20 -4
View File
@@ -2,13 +2,12 @@ using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using VEPROMS.CSLA.Library; using VEPROMS.CSLA.Library;
using Volian.Base.Library; using Volian.Base.Library;
@@ -92,6 +91,10 @@ namespace Volian.Controls.Library
//This flag will be set when the docversion gets updated to let it know that the full tree needs a refresh //This flag will be set when the docversion gets updated to let it know that the full tree needs a refresh
private bool changedDocVersion = false; private bool changedDocVersion = false;
//B2026-057 PROMS Crash when Closing Tabs
// this flag will prevent multiple asking in a row if should updste ROs
private static bool askedAboutchangedDocVersion = false;
public ROFstInfo MyROFST public ROFstInfo MyROFST
{ {
get { return _myROFST; } get { return _myROFST; }
@@ -135,6 +138,7 @@ namespace Volian.Controls.Library
if (_docVersionInfo?.VersionID != value?.VersionID) if (_docVersionInfo?.VersionID != value?.VersionID)
{ {
changedDocVersion = true; changedDocVersion = true;
askedAboutchangedDocVersion = false;
} }
_docVersionInfo = value; _docVersionInfo = value;
@@ -648,9 +652,12 @@ namespace Volian.Controls.Library
{ {
//do nothing - is still checked out //do nothing - is still checked out
} }
else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes) else if (changedDocVersion && !askedAboutchangedDocVersion)
{
Task.Run(() =>
{
if (MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes)
{ {
InitialProgressBarMessage = "Updating ROs"; InitialProgressBarMessage = "Updating ROs";
ROFstInfo roFstInfo = ROFstInfo.Get(fstid); ROFstInfo roFstInfo = ROFstInfo.Get(fstid);
@@ -664,6 +671,15 @@ namespace Volian.Controls.Library
MyROFST = roFstInfo; MyROFST = roFstInfo;
updatedROs = true; updatedROs = true;
askedAboutchangedDocVersion = false;
}
else
{
askedAboutchangedDocVersion = true;
}
});
} }
} }