]> git.saurik.com Git - wxWidgets.git/commit - samples/image/canvas.cpp
Don't use bitmap still selected in wxMemoryDC in image sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Aug 2010 18:57:47 +0000 (18:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Aug 2010 18:57:47 +0000 (18:57 +0000)
commit5ed0415e3e8b202c21dc37410ac3d3ddaf489dbe
tree3dc957abf4f08e84293c06b524b646dbab36ce3b
parent5784031727e81690feb9ac59b56f6c6aad7a6a42
Don't use bitmap still selected in wxMemoryDC in image sample.

The bitmap must be deselected from wxMemoryDC before being used in any other
way but the sample didn't do this. Fix this by simply destroying the DC as
soon as we don't need it, this makes bitmap available for other use as well.

Closes #12310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
samples/image/canvas.cpp