tvplanit: Fix compilation with fpc <3.0. Experimental code to fix a error in Linux Mint/qt at program end (related to calling NavBar.SetImageList in Destructor).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4882 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-01 19:02:09 +00:00
parent cb586c9d08
commit 7cfaefb5e1
5 changed files with 7 additions and 6 deletions

View File

@ -52,7 +52,7 @@ type
implementation implementation
uses uses
LCLProc, LCLProc, LazUtf8,
VpCanvasUtils; VpCanvasUtils;
type type

View File

@ -119,7 +119,7 @@ type
implementation implementation
uses uses
StrUtils, Math, StrUtils, Math, LazUtf8,
VpCanvasUtils, VpMisc; VpCanvasUtils, VpMisc;
const const

View File

@ -46,6 +46,7 @@ type
implementation implementation
uses uses
LazUtf8,
VpCanvasUtils, VpMisc; VpCanvasUtils, VpMisc;
type type

View File

@ -1063,7 +1063,8 @@ end;
destructor TVpCustomNavBar.Destroy; destructor TVpCustomNavBar.Destroy;
begin begin
Images := nil; {unregister any image list notification} FImages.OnChange := nil;
// Images := nil; {unregister any image list notification}
nabChanging := True; nabChanging := True;
nabEdit.Free; nabEdit.Free;
@ -2036,10 +2037,9 @@ procedure TVpCustomNavBar.Notification(AComponent: TComponent;
Operation: TOperation); Operation: TOperation);
begin begin
inherited Notification(AComponent, Operation); inherited Notification(AComponent, Operation);
if Operation = opRemove then begin if Operation = opRemove then begin
if AComponent = FImages then if AComponent = FImages then
Images := nil; FImages := nil;
end; end;
end; end;
{=====} {=====}

View File

@ -55,7 +55,7 @@ type
implementation implementation
uses uses
StrUtils, Math, StrUtils, Math, LazUtf8,
VpCanvasUtils, VpMisc, VpSR; VpCanvasUtils, VpMisc, VpSR;
type type