Changeset 239 for oup/current/Tools


Ignore:
Timestamp:
Jul 14, 2007, 10:22:05 PM (17 years ago)
Author:
alloc
Message:
 
Location:
oup/current/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Tools/MetaEditor.dfm

    r238 r239  
    316316    object vst_newRoot: TMenuItem
    317317      Caption = 'Set as root element in new window'
     318      OnClick = vst_newRootClick
    318319    end
    319320    object vst_setRoot: TMenuItem
  • oup/current/Tools/MetaEditor.pas

    r238 r239  
    5252      var PopupMenu: TPopupMenu);
    5353    procedure vst_setRootClick(Sender: TObject);
     54    procedure vst_newRootClick(Sender: TObject);
    5455  private
    5556    root: TTreeElement;
     
    6263implementation
    6364{$R *.dfm}
    64 uses _MetaManager, _MetaTypes, ConnectionManager, Data, _FileTypes;
     65uses _MetaManager, _MetaTypes, ConnectionManager, Data, _FileTypes, Main;
    6566
    6667type
     
    272273end;
    273274
     275procedure TForm_Meta.vst_newRootClick(Sender: TObject);
     276var
     277  data: PNodeData;
     278  form: TForm_BaseTemplate;
     279begin
     280  inherited;
     281  data := VST.GetNodeData(VST.FocusedNode);
     282  form := nil;
     283  form := Form_Main.open_child('meta');
     284  if form is TForm_Meta then
     285    TForm_Meta(form).SetRoot(data.Field);
     286end;
     287
    274288procedure TForm_Meta.vst_setRootClick(Sender: TObject);
    275289var
Note: See TracChangeset for help on using the changeset viewer.