mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 08:50:16 +02:00
graphic property editor: use TBitmap.Assign instead of setting width, height and drawing on white box
git-svn-id: trunk@13428 -
This commit is contained in:
parent
5cfbb26ced
commit
9825141ffc
@ -202,11 +202,14 @@ begin
|
||||
Ext := ExtractFileExt(TheDialog.FileName);
|
||||
if ABitmap = nil then
|
||||
ABitmap := TBitmap.Create;
|
||||
if (ABitmap is TBitmap) and
|
||||
((CompareText(Ext, '.xpm') = 0) or
|
||||
(CompareText(Ext, '.bmp') = 0)) then
|
||||
|
||||
// Paul: can it be not TBitmap at all?
|
||||
if (ABitmap is TBitmap) then
|
||||
begin
|
||||
ABitmap.LoadFromFile(TheDialog.FileName);
|
||||
if ((CompareText(Ext, '.xpm') = 0) or (CompareText(Ext, '.bmp') = 0)) then
|
||||
ABitmap.LoadFromFile(TheDialog.FileName)
|
||||
else
|
||||
ABitmap.Assign(TheDialog.Preview.Picture.Graphic);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user