summaryrefslogtreecommitdiff
path: root/wx+/button.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:18 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:22:18 +0200
commitbcc5cc28c6dc5178e8f4fd0cc521034ae5def388 (patch)
treebacc60d27b435d32172f97643576c5e4e953177d /wx+/button.cpp
parent5.9 (diff)
downloadFreeFileSync-bcc5cc28c6dc5178e8f4fd0cc521034ae5def388.tar.gz
FreeFileSync-bcc5cc28c6dc5178e8f4fd0cc521034ae5def388.tar.bz2
FreeFileSync-bcc5cc28c6dc5178e8f4fd0cc521034ae5def388.zip
5.10
Diffstat (limited to 'wx+/button.cpp')
-rw-r--r--wx+/button.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/wx+/button.cpp b/wx+/button.cpp
index 8fce99f4..a67624b8 100644
--- a/wx+/button.cpp
+++ b/wx+/button.cpp
@@ -128,8 +128,7 @@ wxBitmap BitmapButton::createBitmapFromText(const wxString& text)
wxBitmap newBitmap(sizeNeeded.GetWidth(), sizeNeeded.GetHeight());
{
- wxMemoryDC dc;
- dc.SelectObject(newBitmap);
+ wxMemoryDC dc(newBitmap);
//set up white background
dc.SetBackground(*wxWHITE_BRUSH);
@@ -150,8 +149,6 @@ wxBitmap BitmapButton::createBitmapFromText(const wxString& text)
dc.SetFont(currentFont);
dc.DrawLabel(textLabelFormatted, wxNullBitmap, wxRect(0, 0, newBitmap.GetWidth(), newBitmap.GetHeight()), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, indexAccel);
-
- dc.SelectObject(wxNullBitmap);
}
//add alpha channel to image
bgstack15