forked from liujianjun/tslediter
设计器
优化体验
This commit is contained in:
@@ -956,8 +956,9 @@ type TVclDesigner = class(tvcform)
|
||||
fcwindowinfo := nd;
|
||||
FTree := fcwindowinfo.ftree;
|
||||
showtree(fcwindowinfo);
|
||||
rnd := FTree.RootItem;
|
||||
nnd := rnd.GetNodeByIndex(0);
|
||||
//rnd := FTree.RootItem;
|
||||
//nnd := rnd.GetNodeByIndex(0);
|
||||
nnd := ftree.CurrentNode;
|
||||
if nnd then
|
||||
begin
|
||||
cp := nnd.Component;
|
||||
@@ -967,9 +968,10 @@ type TVclDesigner = class(tvcform)
|
||||
begin
|
||||
wd.visible := false;
|
||||
wd.visible := true;
|
||||
FPropGrid.Component := cp;
|
||||
FEventGrid.Component := cp;
|
||||
|
||||
end
|
||||
FPropGrid.Component := cp;
|
||||
FEventGrid.Component := cp;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -506,6 +506,7 @@ type TProjectView = class(TVCForm) //
|
||||
if FTree.PopUpMenu then
|
||||
begin
|
||||
it := e.itemnew;
|
||||
if it=ftree.RootNode then return FDesigner.ExecuteCommand("hiddrennode",nil);
|
||||
if it then
|
||||
begin
|
||||
if it.FType="dir" then
|
||||
@@ -743,10 +744,11 @@ type TProjectView = class(TVCForm) //
|
||||
FDesigner.ExecuteCommand("hiddrennode",nil);
|
||||
fn := FCurrentOpend.geteditfilename();
|
||||
it := FTslEditer.OpenAndGotoFileByName(fn);
|
||||
if not it then return FCurrentOpend := nil;
|
||||
|
||||
if not it then
|
||||
begin
|
||||
return FCurrentOpend := nil;
|
||||
end
|
||||
ShowEditor(); //FTslEditer.Show();
|
||||
|
||||
end
|
||||
"form","panel":
|
||||
begin
|
||||
@@ -921,7 +923,8 @@ type TProjectView = class(TVCForm) //
|
||||
end;
|
||||
end
|
||||
//FTree.DeleteNode(nd);
|
||||
nd.Recycling();
|
||||
FTree.DeleteCurrentNode();
|
||||
//nd.Recycling();
|
||||
SaveProjInfo();
|
||||
end
|
||||
end
|
||||
@@ -1903,7 +1906,7 @@ type TFileTree = class(TTreeCtl)
|
||||
FPNode.Caption := "当前工程";
|
||||
FPNode.FType := "dir";
|
||||
FPNode.parent := RootNode;
|
||||
SetSel(FPNode);
|
||||
//SetSel(FPNode);
|
||||
end
|
||||
function GetNodesByName(nds,n);
|
||||
begin
|
||||
@@ -1968,10 +1971,10 @@ type TFileTree = class(TTreeCtl)
|
||||
C := CurrentNode;
|
||||
if not c then return false;
|
||||
if FPNode=c then return false;
|
||||
pc := c.parent;
|
||||
DeleteNode(c);
|
||||
if pc.ItemCount<1 then setsel(pc);
|
||||
else setsel(pc.GetNodeByIndex(0));
|
||||
//pc := c.parent;
|
||||
//DeleteNode(c);
|
||||
//if pc.ItemCount<1 then setsel(pc);
|
||||
//else setsel(pc.GetNodeByIndex(0));
|
||||
c.Recycling();
|
||||
end
|
||||
function GetNodePath(nd); //获得目录节点的path
|
||||
|
||||
Reference in New Issue
Block a user