mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed DisplayProfile ImageListView
I'd managed to break the Display Profile imagelistview with one of my code clearing escapades, but now I have managed to fix it again!
This commit is contained in:
parent
7772b27f89
commit
eef92abebf
@ -1,4 +1,7 @@
|
||||
using DisplayMagicianShared;
|
||||
using DisplayMagicianShared.NVIDIA;
|
||||
using DisplayMagicianShared.AMD;
|
||||
using DisplayMagicianShared.Windows;
|
||||
using Manina.Windows.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -62,8 +65,12 @@ namespace DisplayMagician.UIForms
|
||||
profileToUse = ProfileRepository.CurrentProfile;
|
||||
}
|
||||
|
||||
// Stop the callback doing anything
|
||||
Image.GetThumbnailImageAbort myCallback = new Image.GetThumbnailImageAbort(() => { return false; });
|
||||
return profileToUse.ProfileBitmap.GetThumbnailImage(size.Width, size.Height, myCallback, IntPtr.Zero);
|
||||
|
||||
Image imageToUse;
|
||||
imageToUse = profileToUse.ProfileBitmap.GetThumbnailImage(size.Width, size.Height, myCallback, IntPtr.Zero);
|
||||
return imageToUse;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -564,6 +564,12 @@ namespace DisplayMagicianShared
|
||||
}
|
||||
|
||||
public static bool operator !=(ProfileItem lhs, ProfileItem rhs) => !(lhs == rhs);
|
||||
|
||||
// IMPORTANT - This ProfileItem ToString function is required to make the Profile ImageListView work properly! DO NOT DELETE!
|
||||
public override string ToString()
|
||||
{
|
||||
return (Name ?? Language.UN_TITLED_PROFILE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user