mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
ENH:Protect the bitmap
jira: STUDIO-13044 Change-Id: I12ae5c8508fadd76f2dd3efd8d95c1547133a634 (cherry picked from commit 3ab0610b90fe17580b09d1edf538afd6bcf14b6e)
This commit is contained in:
@@ -192,7 +192,10 @@ bool ComboBox::SetFont(wxFont const& font)
|
|||||||
|
|
||||||
int ComboBox::Append(const wxString &item, const wxBitmap &bitmap, int style)
|
int ComboBox::Append(const wxString &item, const wxBitmap &bitmap, int style)
|
||||||
{
|
{
|
||||||
return Append(item, bitmap, nullptr, style);
|
if (bitmap.IsOk()) {
|
||||||
|
return Append(item, bitmap, nullptr, style);
|
||||||
|
}
|
||||||
|
return Append(item, wxNullBitmap, nullptr, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ComboBox::Append(const wxString &text,
|
int ComboBox::Append(const wxString &text,
|
||||||
@@ -200,7 +203,10 @@ int ComboBox::Append(const wxString &text,
|
|||||||
void * clientData,
|
void * clientData,
|
||||||
int style)
|
int style)
|
||||||
{
|
{
|
||||||
return Append(text, bitmap, wxString{}, clientData, style);
|
if (bitmap.IsOk()) {
|
||||||
|
return Append(text, bitmap, wxString{}, clientData, style);
|
||||||
|
}
|
||||||
|
return Append(text, wxNullBitmap, wxString{}, clientData, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ComboBox::Append(const wxString &text, const wxBitmap &bitmap, const wxString &group, void *clientData, int style)
|
int ComboBox::Append(const wxString &text, const wxBitmap &bitmap, const wxString &group, void *clientData, int style)
|
||||||
|
|||||||
Reference in New Issue
Block a user