Added code to warn user that Unit Information RO values are not editable in the RO Editor
Fixed logic for undo to verifiy what is being undone will not cause a crash of application
This commit is contained in:
parent
869861a6dc
commit
30facbbec0
@ -1526,7 +1526,7 @@ namespace Volian.Controls.Library
|
||||
private void btnUndo_Click(object sender, EventArgs e)
|
||||
{
|
||||
_MyStepRTB.Undo();
|
||||
if (_MyStepRTB.WasXDelete && (_MyStepRTB.Text[_MyStepRTB.SelectionStart - 1] == 'X'))
|
||||
if (_MyStepRTB.WasXDelete && _MyStepRTB.SelectionStart > 0 && _MyStepRTB.TextLength > 0 && (_MyStepRTB.Text[_MyStepRTB.SelectionStart - 1] == 'X'))
|
||||
{
|
||||
_MyStepRTB.Undo();
|
||||
_MyStepRTB.WasXDelete = false;
|
||||
@ -1566,6 +1566,11 @@ namespace Volian.Controls.Library
|
||||
myROID = lt.MyRoUsageInfo.ROID.ToLower();
|
||||
myRODB = lt.MyRoUsageInfo.MyRODb;
|
||||
}
|
||||
if (myROID.StartsWith("ffff"))
|
||||
{
|
||||
MessageBox.Show("Unit Information RO's cannot be edited", "Unit Information RO", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
//string roapp = Environment.GetEnvironmentVariable("roapp");
|
||||
string roapp = Volian.Base.Library.ExeInfo.GetROEditorPath(); // get the path to the RO Editor Executable
|
||||
string args = "\"" + myRODB.FolderPath + "\" " + myROID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user