Document changes in wxImageFileProperty

Remove references to the non-public member variables
from documentation.
This commit is contained in:
Artur Wieczorek 2022-04-18 22:16:23 +02:00
parent 7fc2024f0e
commit b06b950574
4 changed files with 18 additions and 8 deletions

View File

@ -234,6 +234,13 @@ Changes in behaviour which may result in build errors
3.1.7: (released 2022-??-??)
----------------------------
INCOMPATIBLE CHANGES SINCE 3.1.6:
- wxImageFileProperty::m_pImage and m_pBitmap member variables were removed.
They were not intended for the public API. m_image variable represents
cached image now.
NOTE: This file is updated only before the release, please use
$ git log --notes=changelog --format='%N' v3.1.6..|grep .

View File

@ -296,12 +296,14 @@ public:
const wxRect& rect, wxPGPaintData& paintdata ) wxOVERRIDE;
protected:
wxBitmap m_bitmap; // final thumbnail area
void SetImage(const wxImage& img);
wxImage m_image; // original thumbnail area
private:
// Initialize m_image using the current file name.
void LoadImageFromFile();
wxBitmap m_bitmap; // final thumbnail area
};
#endif

View File

@ -248,10 +248,6 @@ public:
virtual wxSize OnMeasureImage( int item ) const;
virtual void OnCustomPaint( wxDC& dc,
const wxRect& rect, wxPGPaintData& paintdata );
protected:
wxBitmap m_bitmap; // final thumbnail area
wxImage m_image; // original thumbnail area
};

View File

@ -1850,17 +1850,22 @@ void wxImageFileProperty::OnSetValue()
wxFileProperty::OnSetValue();
// Delete old image
m_image = wxNullImage;
m_bitmap = wxNullBitmap;
SetImage(wxNullImage);
LoadImageFromFile();
}
void wxImageFileProperty::SetImage(const wxImage& img)
{
m_image = img;
m_bitmap = wxNullBitmap;
}
void wxImageFileProperty::LoadImageFromFile()
{
wxFileName filename = GetFileName();
// Create the image thumbnail
// Cache the image
if ( filename.FileExists() )
{
m_image.LoadFile(filename.GetFullPath());