TvPlanIt: Avoid windows-like messages in printing routines (fixes crashes in cocoa related to PrintPreview).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8888 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-07-21 20:18:22 +00:00
parent d5965cb872
commit d9d497757b
6 changed files with 111 additions and 62 deletions

View File

@ -562,7 +562,7 @@ end;
destructor TVpContactGrid.Destroy;
begin
if HandleAllocated and Assigned(DataStore) and (not (csDesigning in ComponentState)) then
DataStore.DeregisterWatcher(Self); //Handle);
DataStore.DeregisterWatcher({$IFDEF LCL}Self{$ELSE}Handle{$ENDIF});
cgClickTimer.Free;
FContactHeadAttr.Free;
@ -2027,12 +2027,12 @@ end;
procedure TVpContactGrid.InternalSetDatastore(const Value: TVpCustomDatastore);
begin
if Assigned (DataStore) and not (csDesigning in ComponentState) then
DataStore.DeregisterWatcher(Self); //Handle);
DataStore.DeregisterWatcher({$IFDEF LCL}Self{$ELSE}Handle{$ENDIF});
inherited SetDataStore(Value);
if Assigned (DataStore) and not (csDesigning in ComponentState) then
DataStore.RegisterWatcher(Self); //Handle);
DataStore.RegisterWatcher({$IFDEF LCL}Self{$ELSE}Handle{$ENDIF});
if not Assigned(DataStore) then
Exit;