Function

TfrmTemplateEditor.PasteOK

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

function PasteOK: boolean;

Calls Hierarchy


TfrmTemplateEditor.PasteOK
 └TfrmTemplateEditor.AllowMove
   ├TfrmTemplateEditor.IsTemplateLocked
   │ ├TTemplate.AutoLock
   │ │ └TTemplate.LinkType
   │ ├TTemplate.IsLocked
   │ │ └TTemplate.AutoLock...
   │ └..(rec)..
   └TTemplate.GetItems
     └ExpandTemplate
       ├TTemplate.GetChildren
       ├GetTemplateChildren
       ├AddTemplate
       │ ├TTemplate.Create
       │ │ └TTemplate.ReminderDialogIEN
       │ └TTemplate.AddChild
       │   └TTemplate.GetItems...
       └TTemplate.ItemIENs
         └TTemplate.GetItems...

Called-By Hierarchy


            TfrmTemplateEditor.PasteOK
TfrmTemplateEditor.popTemplatesPopup┤ 
TfrmTemplateEditor.mnuNodePasteClick┤ 
 TfrmTemplateEditor.mnuTemplateClick┘ 

Calls

Name Declaration Comments
TfrmTemplateEditor.AllowMove function AllowMove(ADropNode, ADragNode: TTreeNode): boolean; -

Called-By

Name Declaration Comments
TfrmTemplateEditor.mnuNodePasteClick procedure mnuNodePasteClick(Sender: TObject); -
TfrmTemplateEditor.mnuTemplateClick procedure mnuTemplateClick(Sender: TObject); -
TfrmTemplateEditor.popTemplatesPopup procedure popTemplatesPopup(Sender: TObject); -


Source

2945  function TfrmTemplateEditor.PasteOK: boolean;
2946  var
2947    OldCopying: boolean;
2948    Node: TTreeNode;
2949  
2950  begin
2951    Result := assigned(FCopyNode) and assigned(FPasteNode);
2952    if (Result) then
2953      Result := (FTreeControl[TTemplateTreeType(FPasteNode.TreeView.Tag), tcDel].Visible);
2954    if (Result) then
2955    begin
2956      OldCopying := FCopying;
2957      FCopying := TRUE;
2958      try
2959        Node := FPasteNode;
2960        if (TTemplate(Node.Data).RealType = ttDoc) then
2961          Node := Node.Parent;
2962        Result := AllowMove(Node, FCopyNode);
2963      finally
2964        FCopying := OldCopying;
2965      end;
2966    end;
2967  end;