mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-02 13:00:28 -07:00
ENH:Protect the bitmap
jira: STUDIO-13044 Change-Id: I12ae5c8508fadd76f2dd3efd8d95c1547133a634 (cherry picked from commit 3ab0610b90fe17580b09d1edf538afd6bcf14b6e)
This commit is contained in:
parent
b6a68ef312
commit
b0656fefbe
1 changed files with 8 additions and 2 deletions
|
|
@ -192,7 +192,10 @@ bool ComboBox::SetFont(wxFont const& font)
|
|||
|
||||
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,
|
||||
|
|
@ -200,7 +203,10 @@ int ComboBox::Append(const wxString &text,
|
|||
void * clientData,
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue