diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index b1e9b4f..b1c70aa 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -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 diff --git a/designer/udesignerproject.tsf b/designer/udesignerproject.tsf index 67239c5..4496a71 100644 --- a/designer/udesignerproject.tsf +++ b/designer/udesignerproject.tsf @@ -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 diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 6f62cda..63a35f7 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -3199,11 +3199,35 @@ type TPairSplitter=class(tcustomcontrol) // end function MouseMove(o,e);override; begin + if (csDesigning in ComponentState) then return ; if FIs_Draging then begin nxy := clienttowindow(e.xpos,e.ypos); _wapi.ImageList_DragMove(nxy[0],nxy[1]); - end + end else + begin + idx := 0; + for i:= 0 to FSides.count-1 do + begin + vi := FSides[i]; + if vi.Enabled and vi.Visible then idx++; + if idx>1 then break; + end + if idx>1 then + begin + if FSplitterType=pstHorizontal then + begin + cursor := OCR_SIZEWE; + end else + if FSplitterType=pstVertical then + begin + cursor := OCR_SIZENS ; + end + end else + begin + cursor := OCR_NORMAL; + end + end inherited; end function RemoveSide(ASide); diff --git a/funcext/tvclib/utslvcltree.tsf b/funcext/tvclib/utslvcltree.tsf index c52e1ff..eeee9cd 100644 --- a/funcext/tvclib/utslvcltree.tsf +++ b/funcext/tvclib/utslvcltree.tsf @@ -465,6 +465,10 @@ type TcustomTreeCtlNode = class(TVirtualListItem) CurrentDeleteNode := nd; nd.parent := self(true); CurrentDeleteNode := nil; + if nd = Owner.CurrentNode then + begin + Owner.SetSel(nil); + end finally Owner.DecPaintLock(); end @@ -1696,7 +1700,11 @@ type TcustomTreeCtl = class(TVirtualList) @explan(说明) 设置选中节点 %% @param(it)(TcustomTreeCtlNode) 节点 %% **} - if(it is class(TcustomTreeCtlNode))and it.Owner=self then + if flockchangedcall then + begin + return ;// + end + if ifnil(it) or ( (it is class(TcustomTreeCtlNode))and (it.Owner=self)) then begin r := CallSelChange(it); if r then return; @@ -1711,6 +1719,7 @@ type TcustomTreeCtl = class(TVirtualList) end function GoToNode(it); begin + if not((it is class(TcustomTreeCtlNode))and (it.Owner=self)) then return ; if NodeInList(it)then begin //return SetTopLine(GetItemIndex(it)); //滚动 @@ -1756,15 +1765,12 @@ type TcustomTreeCtl = class(TVirtualList) end inherited; end - function CreateNode();virtual; + {function CreateNode();virtual; begin - {** - @ignore(忽略) %% - **} return CreateTreeNode(); r := new TcustomTreeCtlNode(self(true)); return r; - end + end} function CreateTreeNode();virtual; begin r := new TcustomTreeCtlNode(self(true)); @@ -1827,7 +1833,9 @@ type TcustomTreeCtl = class(TVirtualList) begin //setprofiler(1+2+4); //exportfile(ftstream(),"","d:\\tst\\abc.stm",getprofilerinfo(true)); + flockchangedcall := true; if FRootItem then FRootItem.Recycling(); + flockchangedcall := false; FRootItem := nil; FCurrentNode := nil; FOnSelChanging := nil; @@ -1879,6 +1887,7 @@ type TcustomTreeCtl = class(TVirtualList) return FRootItem; end private + flockchangedcall;// FOnlyLeafNodeCheckMark; FNodeHierarchyWidth; FMulSelected;