From: Andreas H. <ah...@us...> - 2004-02-23 23:42:45
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20112/run Modified Files: JvOutlookBar.pas Log Message: Fixed EListError when deleting the active button. Index: JvOutlookBar.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvOutlookBar.pas,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** JvOutlookBar.pas 4 Feb 2004 08:03:11 -0000 1.22 --- JvOutlookBar.pas 23 Feb 2004 23:28:58 -0000 1.23 *************** *** 74,77 **** --- 74,78 ---- public constructor Create(Collection: TCollection); override; + destructor Destroy; override; procedure Assign(Source: TPersistent); override; procedure EditCaption; *************** *** 598,601 **** --- 599,620 ---- end; + destructor TJvOutlookBarButton.Destroy; + var + OBPage: TJvOutlookBarPage; + OB: TJvOutlookBar; + begin + OBPage := TJvOutlookBarPage(TJvOutlookBarButtons(Self.Collection).Owner); + OB := TJvOutlookBar(TJvOutlookBarPages(OBPage.Collection).Owner); + if Assigned(OB) then + begin + if OB.FPressedButtonIndex = Index then + OB.FPressedButtonIndex := -1; + if OB.FLastButtonIndex = Index then + OB.FLastButtonIndex := -1; + OB.Invalidate; + end; + inherited Destroy; + end; + procedure TJvOutlookBarButton.Assign(Source: TPersistent); begin |