B2018-008 - Allow the context menu for style to work in a Property Dialog for Procedures and Sections. Originally the error was identifiedas not allowing case changes, but it also incluuded Bold, Italics and Underline

This commit is contained in:
Rich 2018-02-22 14:25:29 +00:00
parent c931802bea
commit 96e903968f

View File

@ -1171,6 +1171,10 @@ namespace Volian.Controls.Library
folderPath = @"C:\Program Files\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE";
fi = new System.IO.FileInfo(folderPath);
if (fi.Exists) return fi.FullName;
// B2018-038 MathType replaces EqnEdt32.EXE
//folderPath = @"C:\Program Files\MathType\MathType.EXE";
//fi = new System.IO.FileInfo(folderPath);
//if (fi.Exists) return fi.FullName;
return null;
}
if (retval == null)
@ -2328,7 +2332,7 @@ namespace Volian.Controls.Library
// if already in edit mode, we don't want to do the StartEditing code below, because it
// will override the current cursor positioning and selection range.
Control ctrl = FindActiveControl();
if (ctrl == null) return; // null if on property page for procedure & section number/title
if (ctrl == null) return; // B2018-008 If a null is returned, don't do anything
if (ctrl is VlnFlexGrid)
{
// Selected table cell is not in edit mode. Go into edit mode and position acording
@ -2362,7 +2366,7 @@ namespace Volian.Controls.Library
// if already in edit mode, we don't want to do the StartEditing code below, because it
// will override the current cursor positioning and selection range.
Control ctrl = FindActiveControl();
if (ctrl == null) return; // null if on property page for procedure & section number/title
if (ctrl == null) return; // B2018-008 if a null is returned don't do anything
if (ctrl is VlnFlexGrid)
{
// Selected table cell is not in edit mode. Go into edit mode and position acording
@ -2529,8 +2533,8 @@ namespace Volian.Controls.Library
{
tmp = tmp.Parent;
// if coming from property page (properties of procedure & section number/title),
// tmp becomes null rather than from flexgrid or steptext.
if (tmp == null) return null;
// B2018-008 tmp becomes _MyStepRTB rather than from flexgrid or steptext.
if (tmp == null) return _MyStepRTB;
}
Form frm = tmp.Parent as Form;
tmp = frm.ActiveControl;
@ -2555,7 +2559,7 @@ namespace Volian.Controls.Library
private void MoveSelectedToClipboard(bool isCut)
{
Control ctrl = FindActiveControl();
if (ctrl == null) return; // null if on property page for procedure & section number/title
if (ctrl == null) return; // B2018-008 If a null is returned, don't do anything
Clipboard.Clear();
//if (_MyStepRTB == null) return;
if (_MyStepRTB.SelectedText == null || _MyStepRTB.SelectedText == "")