Changeset 239


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

Legend:

Unmodified
Added
Removed
  • oup/current/Main.pas

    r227 r239  
    813813function TForm_Main.open_child(window_context: String; Connection: Integer): TForm_BaseTemplate;
    814814begin
    815   open_child(window_context, Connection, -1);
     815  Result := open_child(window_context, Connection, -1);
    816816end;
    817817
    818818function TForm_Main.open_child(window_context: String): TForm_BaseTemplate;
    819819begin
    820   open_child(window_context, -1, -1);
     820  Result := open_child(window_context, -1, -1);
    821821end;
    822822
  • 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.