<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I got this code for design time editing (note the line+comment ***<span style="font-size: 13.3333px;"> aHook.SelectOnlyThis(aECTC.Tabs); { force the OI to refresh } ***).</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 13.3333px;">That line should refresh OI so the deleted item (CollectionItem) is removed (node in OI).</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">It worked in recent Lazarus versions, but it doesn't work in the latest trunk (i.e. item is removed but related node in OI persists).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I don't know which revision broke it.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">What should I do?</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">Note: Lazarus (TPageControl) have not this problem. It uses plain DeletePersistent() method (in ComponentEditor.pas) .</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">procedure TECTabCtrlEditor.ExecuteVerb(Index: Integer);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">var aECTC: TECTabCtrl;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aECTab: TECTab;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook: TPropertyEditorHook;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> if Component is TECTabCtrl</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> then aECTC:=TECTabCtrl(Component)</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> else exit; { Exit! }</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook:=nil;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> if not GetHook(aHook) then exit; { Exit! }</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> case Index of</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 0: begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aECTab:=aECTC.AddTab(etaLast, True);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.PersistentAdded(aECTab, True);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 1: begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aECTab:=aECTC.AddTab(etaBeside, True);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.PersistentAdded(aECTab, True);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 2: begin</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aECTab:=aECTC.Tabs[aECTC.TabIndex];</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.PersistentDeleting(aECTab);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aECTC.DeleteTab(aECTC.TabIndex);</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> aHook.SelectOnlyThis(aECTC.Tabs); { force the OI to refresh }</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 3: aECTC.MovePrevious();</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> 4: aECTC.MoveNext();</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> Modified;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> end;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">end; </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>