mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Load any bitmaps not stored in PixmapManager when starting File associations.
This commit is contained in:
parent
7135c9ded1
commit
eebe9b4e21
1 changed files with 11 additions and 1 deletions
|
|
@ -147,6 +147,7 @@ procedure TfrmFileAssoc.FormCreate(Sender: TObject);
|
|||
var
|
||||
I, iCount : Integer;
|
||||
sName : String;
|
||||
Bitmap : TBitmap;
|
||||
begin
|
||||
Exts := TExts.Create;
|
||||
// load extension file
|
||||
|
|
@ -162,7 +163,16 @@ begin
|
|||
sName := Exts.Items[I].Name;
|
||||
if sName = '' then
|
||||
sName := Exts.Items[I].SectionName;
|
||||
lbFileTypes.Items.AddObject(sName, nil);
|
||||
|
||||
if Exts.Items[I].IconIndex < 0 then
|
||||
begin
|
||||
// load icon for use in OnDrawItem procedure
|
||||
Bitmap := LoadBitmapFromFile(Exts.Items[I].Icon, gIconsSize, lbFileTypes.Color);
|
||||
end
|
||||
else
|
||||
Bitmap := nil;
|
||||
|
||||
lbFileTypes.Items.AddObject(sName, Bitmap);
|
||||
end;
|
||||
if iCount > 0 then
|
||||
lbFileTypes.ItemIndex:= 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue