This commit is contained in:
parent
2d008eb046
commit
139b3a35cd
@ -952,6 +952,7 @@ namespace Volian.Controls.Library
|
|||||||
// if already in edit mode, we don't want to do the StartEditing code below, because it
|
// 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.
|
// will override the current cursor positioning and selection range.
|
||||||
Control ctrl = FindActiveControl();
|
Control ctrl = FindActiveControl();
|
||||||
|
if (ctrl == null) return; // null if on property page for procedure & section number/title
|
||||||
if (ctrl is VlnFlexGrid)
|
if (ctrl is VlnFlexGrid)
|
||||||
{
|
{
|
||||||
// Selected table cell is not in edit mode. Go into edit mode and position acording
|
// Selected table cell is not in edit mode. Go into edit mode and position acording
|
||||||
@ -1004,7 +1005,8 @@ namespace Volian.Controls.Library
|
|||||||
StartGridEditing(SelectionOption.End);
|
StartGridEditing(SelectionOption.End);
|
||||||
IDataObject myDO = Clipboard.GetDataObject();
|
IDataObject myDO = Clipboard.GetDataObject();
|
||||||
RichTextBox myRtb = _MyStepRTB;
|
RichTextBox myRtb = _MyStepRTB;
|
||||||
Control ctrl = FindActiveControl();
|
Control ctrl = FindActiveControl(); // null if on property page for procedure & section number/title
|
||||||
|
if (ctrl == null) return;
|
||||||
//Console.WriteLine("Paste myRTB == ctrl {0}", myRtb.Equals(ctrl));
|
//Console.WriteLine("Paste myRTB == ctrl {0}", myRtb.Equals(ctrl));
|
||||||
if (!_MyStepRTB.Focused)
|
if (!_MyStepRTB.Focused)
|
||||||
{
|
{
|
||||||
@ -1064,7 +1066,12 @@ namespace Volian.Controls.Library
|
|||||||
bool beenThereDoneThat = false; // flag to prevent infinate loop
|
bool beenThereDoneThat = false; // flag to prevent infinate loop
|
||||||
Control tmp = this;
|
Control tmp = this;
|
||||||
while (!(tmp.Parent is Form))
|
while (!(tmp.Parent is Form))
|
||||||
|
{
|
||||||
tmp = tmp.Parent;
|
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;
|
||||||
|
}
|
||||||
Form frm = tmp.Parent as Form;
|
Form frm = tmp.Parent as Form;
|
||||||
tmp = frm.ActiveControl;
|
tmp = frm.ActiveControl;
|
||||||
while (!beenThereDoneThat && tmp.Controls.Count > 0)
|
while (!beenThereDoneThat && tmp.Controls.Count > 0)
|
||||||
@ -1088,6 +1095,7 @@ namespace Volian.Controls.Library
|
|||||||
private void MoveSelectedToClipboard(bool isCut)
|
private void MoveSelectedToClipboard(bool isCut)
|
||||||
{
|
{
|
||||||
Control ctrl = FindActiveControl();
|
Control ctrl = FindActiveControl();
|
||||||
|
if (ctrl == null) return; // null if on property page for procedure & section number/title
|
||||||
Clipboard.Clear();
|
Clipboard.Clear();
|
||||||
DataObject myDO = new DataObject(); ;
|
DataObject myDO = new DataObject(); ;
|
||||||
if (ctrl is RichTextBox)
|
if (ctrl is RichTextBox)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user