Component Tree in Object Inspector autoexpands
Original Reporter info from Mantis: Valdas
-
Reporter name: Valdas Jankūnas
Original Reporter info from Mantis: Valdas
- Reporter name: Valdas Jankūnas
Description:
Try attached example:
- collapse tree branch "Panel2" in ObjectInspector;
- add new component in to Form.
OR
- collapse tree branch "Panel2" in ObjectInspector;
- open AnchorEditor for "Panel1";
- disable/enable Top anchor.
After that Component Tree in Object Inspector becomes all-expanded.
This behavior is especially bad/annoying when working with project which contains many components: space of monitor is not enormous so you collapsing nodes in object inspector for easier navigation; after one change (mentioned earlier) all nodes suddenly becomes expanded.
Additional information:
After code analysis I found:
- in file "components/ideintf/propedit.pp" procedure "TPropertyEditorHook.Modified" is called;
- which calls "TPropHookModifiedWithName(FHandlers[htModifiedWithName][i])(Sender, PropName)" in same file;
- execution jumps to procedure "TMainIDE.PropHookModified" in file "ide/main.pp";
- where "ObjectInspector1.FillComponentList" is called;
- execution jumps to procedure "TObjectInspectorDlg.FillComponentList" in file "components/ideintf/objectinspector.pp";
- where "ComponentTree.RebuildComponentNodes" is called;
- execution jumps to procedure "TComponentTreeView.RebuildComponentNodes" in file "components/ideintf/componenttreeview.pas";
- there "Items.Clear" is called which destroys all info on collapsed/expanded state (also there is call to "RootNode.Expand(true)");
My thought: there expanded/collapsed state save/restore is needed.