Added code to handle collection was modified error when copying items
Added code to make F5 and Shift-F5 keystrokes in the editor work identical to the right mouse button context menu of the tree view with regards to copy and paste of items Added code to assure only items of similar type (eg: procedure, section, high level step, etc) can be copied and pasted at similar locations within a procedure or working draft
This commit is contained in:
@@ -2033,8 +2033,19 @@ namespace Volian.Controls.Library
|
||||
if (e.Shift)
|
||||
{
|
||||
e.Handled = true;
|
||||
if (!OnCheckClipboard(this, new EventArgs())) return; // check if 'clipboard' contains a step.
|
||||
OnSetMenu(this, new StepRTBMenuEventArgs("StepPaste"));
|
||||
ItemInfo myCopyStep = (this.Parent.Parent.Parent as StepTabPanel).MyDisplayTabControl.MyCopyStep;
|
||||
if (myCopyStep != null)
|
||||
{
|
||||
if (this.MyItemInfo.IsSection && myCopyStep.IsSection)
|
||||
OnSetMenu(this, new StepRTBMenuEventArgs("StepPaste"));
|
||||
if (this.MyItemInfo.IsStep && myCopyStep.IsStep)
|
||||
{
|
||||
if ((this.MyItemInfo.IsHigh && myCopyStep.IsHigh) || (!this.MyItemInfo.IsHigh && !myCopyStep.IsHigh))
|
||||
OnSetMenu(this, new StepRTBMenuEventArgs("StepPaste"));
|
||||
}
|
||||
}
|
||||
//if (!OnCheckClipboard(this, new EventArgs())) return; // check if 'clipboard' contains a step.
|
||||
//OnSetMenu(this, new StepRTBMenuEventArgs("StepPaste"));
|
||||
}
|
||||
else if (!e.Control && !e.Alt)
|
||||
{
|
||||
|
Reference in New Issue
Block a user