mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 22:29:43 +02:00
* TQtImage bugfix.
git-svn-id: trunk@11499 -
This commit is contained in:
parent
430c980211
commit
0b8530d071
@ -533,6 +533,8 @@ end;
|
||||
function TQtWidgetSet.DeleteObject(GDIObject: HGDIOBJ): Boolean;
|
||||
var
|
||||
aObject: TObject;
|
||||
APaintEngine: QPaintEngineH;
|
||||
APainter: QPainterH;
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
ObjType: string;
|
||||
{$endif}
|
||||
@ -596,8 +598,18 @@ begin
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
ObjType := 'Image';
|
||||
{$endif}
|
||||
|
||||
// TQtImage(aObject).Free;
|
||||
|
||||
// we must stop paintdevice before destroying
|
||||
APaintEngine := QImage_paintEngine(TQtImage(AObject).Handle);
|
||||
|
||||
if (APaintEngine <> NiL)
|
||||
and QPaintEngine_isActive(APaintEngine) then
|
||||
begin
|
||||
APainter := QPaintEngine_painter(APaintEngine);
|
||||
if APainter <> NiL
|
||||
then
|
||||
QPainter_end(APainter);
|
||||
end ;
|
||||
end
|
||||
{------------------------------------------------------------------------------
|
||||
Region
|
||||
@ -631,10 +643,10 @@ begin
|
||||
AObject:=nil;
|
||||
end;
|
||||
|
||||
if (AObject <> nil) then
|
||||
if (AObject <> nil)
|
||||
then
|
||||
AObject.Free;
|
||||
|
||||
|
||||
// Find out if we want to release internal GDI object
|
||||
{ case GDIType of
|
||||
gdiBrush:
|
||||
|
Loading…
Reference in New Issue
Block a user